Class: Arkaan::Campaigns::Files::Permission
- Inherits:
-
Object
- Object
- Arkaan::Campaigns::Files::Permission
- Includes:
- Arkaan::Concerns::Enumerable, Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/arkaan/campaigns/files/permission.rb
Overview
A file permission is the permission given by the creator of the file to another player to access it.
Instance Attribute Summary collapse
-
#file ⇒ Arkaan::Campaigns::File
The file on which the permissions are granted.
-
#invitation ⇒ Arkaan::Campaigns::Invitation
The invitation of the player in the campaign where this file was uploaded.
-
#status ⇒ Symbol
The current level of permission for the linked user on the linked file.
Instance Attribute Details
#file ⇒ Arkaan::Campaigns::File
Returns the file on which the permissions are granted.
22 |
# File 'lib/arkaan/campaigns/files/permission.rb', line 22 belongs_to :file, class_name: 'Arkaan::Campaigns::File', inverse_of: :permissions |
#invitation ⇒ Arkaan::Campaigns::Invitation
Returns the invitation of the player in the campaign where this file was uploaded.
19 |
# File 'lib/arkaan/campaigns/files/permission.rb', line 19 belongs_to :invitation, class_name: 'Arkaan::Campaigns::Invitation', inverse_of: :permissions |
#status ⇒ Symbol
Returns the current level of permission for the linked user on the linked file.
15 |
# File 'lib/arkaan/campaigns/files/permission.rb', line 15 enum_field :level, [:creator, :read], default: :read |