diff --git a/app/controllers/ajax/moderation_controller.rb b/app/controllers/ajax/moderation_controller.rb index 41df3c9d..61cb79c6 100644 --- a/app/controllers/ajax/moderation_controller.rb +++ b/app/controllers/ajax/moderation_controller.rb @@ -84,7 +84,7 @@ class Ajax::ModerationController < AjaxController target_user = User.find_by_screen_name!(params[:user]) @response[:message] = t(".error") - return unless %w(moderator administrator).include? params[:type].downcase + return unless %w[moderator administrator].include? params[:type].downcase unless current_user.has_cached_role?(:administrator) @response[:status] = :nopriv diff --git a/app/views/modal/privileges/_item.html.haml b/app/views/modal/privileges/_item.html.haml index 7585e292..c9be9a30 100644 --- a/app/views/modal/privileges/_item.html.haml +++ b/app/views/modal/privileges/_item.html.haml @@ -3,7 +3,11 @@ %li.list-group-item{ id: "privilege-#{privilege}" } .d-flex .flex-shrink-0 - %input{ type: :checkbox, name: "check-your-privileges", data: { type: privilege, user: user.screen_name }, checked: user.has_cached_role?(privilege.to_sym), autocomplete: :off } + %input{ type: :checkbox, + name: "check-your-privileges", + data: { type: privilege, user: user.screen_name }, + checked: user.has_cached_role?(privilege.to_sym), + autocomplete: :off } .flex-grow-1 .list-group-item-heading= privilege.capitalize - unless description.blank?