Replace ban/banned with suspend/suspended in user facing text (#5816) [deploy]

This commit is contained in:
rhymes 2020-02-10 16:12:53 +01:00 committed by GitHub
parent d090ebf026
commit c41d66e900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 31 additions and 31 deletions

View file

@ -5,9 +5,9 @@
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
size, disability, ethnicity, sex characteristics, gender identity and
expression, level of experience, education, socio-economic status, nationality,
personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to suspend temporarily or permanently
any contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.
## Scope
@ -55,11 +55,11 @@ further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at yo@dev.to. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported by contacting the project team at yo@dev.to. All complaints will be
reviewed and investigated and will result in a response that is deemed necessary
and appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
@ -67,8 +67,9 @@ members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org

View file

@ -58,8 +58,8 @@ class ApplicationController < ActionController::Base
end
end
def raise_banned
raise "BANNED" if current_user&.banned
def raise_suspended
raise "SUSPENDED" if current_user&.banned
end
def internal_navigation?

View file

@ -3,7 +3,7 @@ class ArticlesController < ApplicationController
before_action :authenticate_user!, except: %i[feed new]
before_action :set_article, only: %i[edit manage update destroy stats]
before_action :raise_banned, only: %i[new create update]
before_action :raise_suspended, only: %i[new create update]
before_action :set_cache_control_headers, only: %i[feed]
after_action :verify_authorized

View file

@ -50,10 +50,8 @@ class ChatChannelsController < ApplicationController
if banned_user
banned_user.add_role :banned
banned_user.messages.delete_all
Pusher.trigger(@chat_channel.pusher_channels,
"user-banned",
{ userId: banned_user.id }.to_json)
render json: { status: "success", message: "banned!" }, status: :ok
Pusher.trigger(@chat_channel.pusher_channels, "user-banned", { userId: banned_user.id }.to_json)
render json: { status: "success", message: "suspended!" }, status: :ok
else
render json: { status: "error", message: "username not found" }, status: :bad_request
end
@ -61,7 +59,7 @@ class ChatChannelsController < ApplicationController
banned_user = User.find_by(username: command[1])
if banned_user
banned_user.remove_role :banned
render json: { status: "success", message: "unbanned!" }, status: :ok
render json: { status: "success", message: "unsuspended!" }, status: :ok
else
render json: { status: "error", message: "username not found" }, status: :bad_request
end

View file

@ -1,8 +1,9 @@
class ClassifiedListingsController < ApplicationController
include ClassifiedListingsToolkit
before_action :set_classified_listing, only: %i[edit update destroy]
before_action :set_cache_control_headers, only: %i[index]
before_action :raise_banned, only: %i[new create update]
before_action :raise_suspended, only: %i[new create update]
after_action :verify_authorized, only: %i[edit update]
before_action :authenticate_user!, only: %i[edit update new dashboard]

View file

@ -119,7 +119,7 @@ class MessagesController < ApplicationController
status: "error",
message: {
chat_channel_id: message_params[:chat_channel_id],
message: "You can not do that because you are banned",
message: "You can not do that because you are suspended",
type: "error"
}
}, status: :unauthorized

View file

@ -1,6 +1,6 @@
class UsersController < ApplicationController
before_action :set_no_cache_header
before_action :raise_banned, only: %i[update]
before_action :raise_suspended, only: %i[update]
before_action :set_user, only: %i[update update_twitch_username update_language_settings confirm_destroy request_destroy full_delete remove_association]
after_action :verify_authorized, except: %i[signout_confirm add_org_admin remove_org_admin remove_from_org]
before_action :authenticate_user!, only: %i[onboarding_update onboarding_checkbox_update]

View file

@ -33,7 +33,7 @@
<p>Violations of the Code of Conduct may be reported by contacting the team via the
<a href="https://dev.to/report-abuse">abuse report form</a> or by sending an email to yo@dev.to. All reports will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Further details of specific enforcement policies may be posted separately.
</p>
<p>Moderators have the right and responsibility to remove comments or other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any members for other behaviors that they deem inappropriate, threatening, offensive, or harmful.</p>
<p>Moderators have the right and responsibility to remove comments or other contributions that are not aligned to this Code of Conduct, or to suspend temporarily or permanently any members for other behaviors that they deem inappropriate, threatening, offensive, or harmful.</p>
<h2>Attribution</h2>
<p>This Code of Conduct is adapted from:</p>
<ul>

View file

@ -62,7 +62,7 @@
<%= f.label :proof, "Proof *" %>
<%= f.text_area :proof, placeholder: "This is just a quick blurb indicating or link that shows that you clearly are associated with this organization." %>
<div style="width:560px;max-width:90%;">
You must have your organization's permission to submit this form. Dishonesty may result in a permanent ban.
You must have your organization's permission to submit this form. Dishonesty may result in a permanent suspension.
</div>
</div>
<div class="field">

View file

@ -2,7 +2,7 @@
# https://docs.honeybadger.io/lib/ruby/getting-started/ignoring-errors.html#ignore-programmatically
MESSAGE_FINGERPRINTS = {
"BANNED" => "banned",
"SUSPENDED" => "banned",
"Rack::Timeout::RequestTimeoutException" => "rack_timeout",
"Rack::Timeout::RequestTimeoutError" => "rack_timeout",
"PG::QueryCanceled" => "pg_query_canceled"

View file

@ -248,7 +248,7 @@ RSpec.describe "ClassifiedListings", type: :request do
user.add_role(:banned)
expect do
post "/listings", params: listing_params
end.to raise_error("BANNED")
end.to raise_error("SUSPENDED")
end
end
end

View file

@ -5,6 +5,6 @@ RSpec.describe "Banned user", type: :system do
it "tries to create an article" do
sign_in banned_user
expect { visit "/new" }.to raise_error("BANNED")
expect { visit "/new" }.to raise_error("SUSPENDED")
end
end