Fix lint nits

This commit is contained in:
Andreas Nedbal 2024-02-28 00:40:38 +01:00 committed by Andreas Nedbal
parent 2db1d998b7
commit af666c7733
2 changed files with 6 additions and 2 deletions

View File

@ -84,7 +84,7 @@ class Ajax::ModerationController < AjaxController
target_user = User.find_by_screen_name!(params[:user]) target_user = User.find_by_screen_name!(params[:user])
@response[:message] = t(".error") @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) unless current_user.has_cached_role?(:administrator)
@response[:status] = :nopriv @response[:status] = :nopriv

View File

@ -3,7 +3,11 @@
%li.list-group-item{ id: "privilege-#{privilege}" } %li.list-group-item{ id: "privilege-#{privilege}" }
.d-flex .d-flex
.flex-shrink-0 .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 .flex-grow-1
.list-group-item-heading= privilege.capitalize .list-group-item-heading= privilege.capitalize
- unless description.blank? - unless description.blank?