Class: Hyrax::PermissionTemplateAccess
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Hyrax::PermissionTemplateAccess
- Defined in:
- app/models/hyrax/permission_template_access.rb
Constant Summary collapse
- VIEW =
'view'.freeze
- DEPOSIT =
'deposit'.freeze
- MANAGE =
'manage'.freeze
Instance Method Summary collapse
Instance Method Details
#admin_group? ⇒ Boolean
33 34 35 |
# File 'app/models/hyrax/permission_template_access.rb', line 33 def admin_group? agent_type == 'group' && agent_id == ::Ability.admin_group_name end |
#label ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/models/hyrax/permission_template_access.rb', line 21 def label return agent_id unless agent_type == 'group' case agent_id when 'registered' I18n.t('hyrax.admin.admin_sets.form_participant_table.registered_users') when ::Ability.admin_group_name I18n.t('hyrax.admin.admin_sets.form_participant_table.admin_users') else agent_id end end |