Class: Arkaan::Permissions::Group
- Inherits:
-
Object
- Object
- Arkaan::Permissions::Group
- Includes:
- Concerns::Sluggable, Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/arkaan/permissions/group.rb
Overview
A group gathers one or several users to give them the same rights for conviniency purposes.
Instance Attribute Summary collapse
-
#accounts ⇒ Array<Arkaan::Account>
The accounts having the rights granted by this group.
-
#is_default ⇒ Boolean
A boolean indicating whether this group is given when a new user registered or not.
-
#is_superuser ⇒ Boolean
A boolean indicating whether this group should have access to all groups and rights or not.
-
#rights ⇒ Array<Arkaan::Permissions::Right>
The rights granted by belonging to this group.
-
#routes ⇒ Array<Arkaan::Monitoring::Route>
The routes this group can access in the API.
Instance Attribute Details
#accounts ⇒ Array<Arkaan::Account>
Returns the accounts having the rights granted by this group.
19 |
# File 'lib/arkaan/permissions/group.rb', line 19 has_and_belongs_to_many :accounts, class_name: 'Arkaan::Account', inverse_of: :groups |
#is_default ⇒ Boolean
Returns a boolean indicating whether this group is given when a new user registered or not.
12 |
# File 'lib/arkaan/permissions/group.rb', line 12 field :is_default, type: Boolean, default: false |
#is_superuser ⇒ Boolean
Returns a boolean indicating whether this group should have access to all groups and rights or not.
15 |
# File 'lib/arkaan/permissions/group.rb', line 15 field :is_superuser, type: Boolean, default: false |
#rights ⇒ Array<Arkaan::Permissions::Right>
Returns the rights granted by belonging to this group.
22 |
# File 'lib/arkaan/permissions/group.rb', line 22 has_and_belongs_to_many :rights, class_name: 'Arkaan::Permissions::Right', inverse_of: :groups |
#routes ⇒ Array<Arkaan::Monitoring::Route>
Returns the routes this group can access in the API.
25 |
# File 'lib/arkaan/permissions/group.rb', line 25 has_and_belongs_to_many :routes, class_name: 'Arkaan::Monitoring::Route', inverse_of: :groups |