Sha256: 9014a44154aa10f13cde0dcddb4778a507754ec8ea64de1cd86d3350f460775e
Contents?: true
Size: 608 Bytes
Versions: 29
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true 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
29 entries across 29 versions & 1 rubygems