Skip to content

Commit

Permalink
Ignore rubocop's complaint
Browse files Browse the repository at this point in the history
  • Loading branch information
laritakr committed Feb 1, 2024
1 parent 4e91ab9 commit 27164f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/concerns/hyrax/ability/admin_set_ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module Hyrax
module Ability
module AdminSetAbility
def admin_set_abilities # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
def admin_set_abilities # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
models = [AdminSet, Hyrax::AdministrativeSet, Hyrax.config.admin_set_class].uniq
if admin?
models.each do |admin_set_model|
Expand All @@ -12,6 +12,7 @@ def admin_set_abilities # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
can :view_admin_show_any, admin_set_model
end
else
# rubocop:disable Lint/UnusedBlockArgument
models.each { |admin_set_model| can :manage_any, admin_st_model } if
Hyrax::Collections::PermissionsService.can_manage_any_admin_set?(ability: self)

Expand All @@ -20,6 +21,7 @@ def admin_set_abilities # rubocop:disable Metrics/MethodLength, Metrics/AbcSize

models.each { |admin_set_model| can :view_admin_show_any, admin_st_model } if
Hyrax::Collections::PermissionsService.can_view_admin_show_for_any_collection?(ability: self)
# rubocop:enable Lint/UnusedBlockArgument

# [:edit, :update, :destroy] for AdminSet is controlled by Hydra::Ability #edit_permissions
models.each do |admin_set_model|
Expand Down

0 comments on commit 27164f2

Please sign in to comment.