Module: Hyrax::Ability::PermissionTemplateAbility
- Defined in:
- app/models/concerns/hyrax/ability/permission_template_ability.rb
Instance Method Summary collapse
Instance Method Details
#permission_template_abilities ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/concerns/hyrax/ability/permission_template_ability.rb', line 5 def if admin? can :manage, [Hyrax::PermissionTemplate, Hyrax::PermissionTemplateAccess] else can [:create, :edit, :update, :destroy], Hyrax::PermissionTemplate do |template| test_edit(template.source_id) end can [:create, :edit, :update, :destroy], Hyrax::PermissionTemplateAccess do |access| test_edit(access..source_id) end end end |