Class: Hyrax::AccessControlList::ModeGrant Private
- Inherits:
-
ModeEditor
- Object
- ModeEditor
- Hyrax::AccessControlList::ModeGrant
- Defined in:
- app/services/hyrax/access_control_list.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A short-term memory object for the permission granting DSL. Use with method chaining, as in: ‘acl.grant(:edit).to(user)`.
Instance Method Summary collapse
Methods inherited from ModeEditor
Constructor Details
This class inherits a constructor from Hyrax::AccessControlList::ModeEditor
Instance Method Details
#to(user_or_group) ⇒ Hyrax::AccessControlList
223 224 225 226 227 228 |
# File 'app/services/hyrax/access_control_list.rb', line 223 def to(user_or_group) agent_id = id_for(agent: user_or_group) @acl << Hyrax::Permission.new(access_to: @acl.resource.id, agent: agent_id, mode: @mode) @acl end |