app/models/spotlight/ability.rb in blacklight-spotlight-3.0.0.alpha.2 vs app/models/spotlight/ability.rb in blacklight-spotlight-3.0.0.alpha.3
- old
+ new
@@ -13,11 +13,11 @@
alias_action :process_import, to: :import
can :manage, :all if user.superadmin?
# exhibit admin
- can [:update, :import, :export, :destroy], Spotlight::Exhibit, id: user.admin_roles.pluck(:resource_id)
+ can %i[update import export destroy], Spotlight::Exhibit, id: user.admin_roles.pluck(:resource_id)
can :manage, [Spotlight::BlacklightConfiguration, Spotlight::ContactEmail, Spotlight::Language], exhibit_id: user.admin_roles.pluck(:resource_id)
can :manage, Spotlight::Role, resource_id: user.admin_roles.pluck(:resource_id), resource_type: 'Spotlight::Exhibit'
can :manage, [PaperTrail::Version, Spotlight::FeaturedImage] if user.roles.any?
@@ -34,10 +34,10 @@
], exhibit_id: user.exhibit_roles.pluck(:resource_id)
can :manage, Spotlight::Lock, by: user
can :read, Spotlight::Language, exhibit_id: user.exhibit_roles.pluck(:resource_id)
- can [:read, :curate, :tag], Spotlight::Exhibit, id: user.exhibit_roles.pluck(:resource_id)
+ can %i[read curate tag], Spotlight::Exhibit, id: user.exhibit_roles.pluck(:resource_id)
# public
can :read, Spotlight::HomePage
can :read, Spotlight::Exhibit, published: true
can :read, Spotlight::Page, published: true