Class: Core::Models::Files::Permission
- Inherits:
-
Object
- Object
- Core::Models::Files::Permission
- Includes:
- Concerns::Enumerable, Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/core/models/files/permission.rb
Overview
The permission granted to a user to access and/or delete a file.
Instance Attribute Summary collapse
-
#account ⇒ Core::Models::Account
The user being granted the access to the file.
-
#file ⇒ Core::Models::Files::Document
The document the permission is linked to.
-
#type ⇒ Symbol
The type of permission granted (is the user able to delete the file ?).
Instance Attribute Details
#account ⇒ Core::Models::Account
Returns the user being granted the access to the file.
22 |
# File 'lib/core/models/files/permission.rb', line 22 belongs_to :account, class_name: 'Core::Models::Account', inverse_of: :permissions |
#file ⇒ Core::Models::Files::Document
Returns the document the permission is linked to.
19 |
# File 'lib/core/models/files/permission.rb', line 19 belongs_to :file, class_name: 'Core::Models::Files::Document', inverse_of: :permissions |
#type ⇒ Symbol
Returns the type of permission granted (is the user able to delete the file ?).
15 |
# File 'lib/core/models/files/permission.rb', line 15 enum_field :type, [:read, :read_write] |