Sha256: c9ae8ac2308e637cce0275b314de4a6f2660fe44d51bc1e9b7443df987b747f9

Contents?: true

Size: 578 Bytes

Versions: 36

Compression:

Stored size: 578 Bytes

Contents

module Hyrax
  module Ability
    module PermissionTemplateAbility
      def permission_template_abilities
        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.permission_template.source_id)
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.9.5 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.9.4 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.9.3 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.9.2 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.9.1 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.9.0 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.8.0 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.7.2 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.7.1 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.7.0 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.6.0 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-3.0.0.pre.rc1 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-3.0.0.pre.beta3 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.5.1 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.5.0 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-3.0.0.pre.beta2 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.4.1 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-3.0.0.pre.beta1 app/models/concerns/hyrax/ability/permission_template_ability.rb
hyrax-2.4.0 app/models/concerns/hyrax/ability/permission_template_ability.rb