diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index b9a3990e6..50ca63e22 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -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 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2fc301def..57e9752dc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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? diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index e3ca85a72..b84956e5e 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -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 diff --git a/app/controllers/chat_channels_controller.rb b/app/controllers/chat_channels_controller.rb index 5dece12ad..69c9c64ff 100644 --- a/app/controllers/chat_channels_controller.rb +++ b/app/controllers/chat_channels_controller.rb @@ -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 diff --git a/app/controllers/classified_listings_controller.rb b/app/controllers/classified_listings_controller.rb index ced0e3bc4..4d44c8293 100644 --- a/app/controllers/classified_listings_controller.rb +++ b/app/controllers/classified_listings_controller.rb @@ -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] diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 4273ddd47..f8ffb2612 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -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 diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 138721abc..84f08b3b9 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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] diff --git a/app/views/pages/_coc_text.html.erb b/app/views/pages/_coc_text.html.erb index b58d24328..f49c2631d 100644 --- a/app/views/pages/_coc_text.html.erb +++ b/app/views/pages/_coc_text.html.erb @@ -33,7 +33,7 @@

Violations of the Code of Conduct may be reported by contacting the team via the abuse report form 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.

-

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.

+

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.

Attribution

This Code of Conduct is adapted from: