Class: Hyrax::CollectionTypeParticipant
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Hyrax::CollectionTypeParticipant
- Defined in:
- app/models/hyrax/collection_type_participant.rb
Constant Summary collapse
- MANAGE_ACCESS =
'manage'
- CREATE_ACCESS =
'create'
- GROUP_TYPE =
'group'
- USER_TYPE =
'user'
Instance Method Summary collapse
Instance Method Details
#creator? ⇒ Boolean
24 25 26 |
# File 'app/models/hyrax/collection_type_participant.rb', line 24 def creator? access == CREATE_ACCESS end |
#label ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/models/hyrax/collection_type_participant.rb', line 28 def label return agent_id unless agent_type == GROUP_TYPE case agent_id when ::Ability.registered_group_name 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 |
#manager? ⇒ Boolean
20 21 22 |
# File 'app/models/hyrax/collection_type_participant.rb', line 20 def manager? access == MANAGE_ACCESS end |