From af666c7733a90352a0a2bd193e804100667aab1e Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 28 Feb 2024 00:40:38 +0100 Subject: [PATCH] Fix lint nits --- app/controllers/ajax/moderation_controller.rb | 2 +- app/views/modal/privileges/_item.html.haml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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?