Class: Virtuaservices::Account
- Inherits:
-
Object
- Object
- Virtuaservices::Account
- Includes:
- ActiveModel::SecurePassword, Mongoid::Document, Mongoid::Timestamps, Concerns::Enumerable
- Defined in:
- lib/virtuaservices/account.rb
Overview
A user account with all related attributes. It holds credentials and informations about a designated user.
Instance Attribute Summary collapse
-
#applications ⇒ Array<Virtuaservices::OAuth::Application] the applications this user has created and owns.
Array<Virtuaservices::OAuth::Application] the applications this user has created and owns.
-
#email ⇒ String
The email address of the user, useful to contact them ; it must be given, unique, and have an email format.
-
#firstname ⇒ String
The first name of the user.
-
#gender ⇒ Symbol
The way you prefer the application to gender you.
-
#groups ⇒ Array<Virtuaservices::Permissions::Group>
The groups giving their corresponding rights to the current account.
-
#language ⇒ Symbol
The language preferred by this user.
-
#lastname ⇒ String
The last name (family name) of the user.
-
#password ⇒ String
writeonly
Password, in clear, of the user ; do not attempt to get the value, just set it when changing the password.
-
#password_confirmation ⇒ String
writeonly
The confirmation of the password, do not get, just set it ; it must be the same as the password.
-
#password_digest ⇒ String
readonly
The password of the user, encrypted with the Blowfish algorithm.
-
#services ⇒ Array<Virtuaservices::Monitoring::Service>
The services created by this user.
-
#sessions ⇒ Array<Virtuaservices::Authentication::Session>
The sessions on which this account is, or has been logged in.
-
#username ⇒ String
The nickname the user chose at subscription, must be given, unique, and 6 or more characters long.
-
#websockets ⇒ Array<Virtuaservices::Monitoring::Websocket>
The websockets created by the owner of this account.
Instance Attribute Details
#applications ⇒ Array<Virtuaservices::OAuth::Application] the applications this user has created and owns.
Returns Array<Virtuaservices::OAuth::Application] the applications this user has created and owns.
44 |
# File 'lib/virtuaservices/account.rb', line 44 has_many :applications, class_name: 'Virtuaservices::OAuth::Application', inverse_of: :creator |
#email ⇒ String
Returns the email address of the user, useful to contact them ; it must be given, unique, and have an email format.
24 |
# File 'lib/virtuaservices/account.rb', line 24 field :email, type: String |
#firstname ⇒ String
Returns the first name of the user.
21 |
# File 'lib/virtuaservices/account.rb', line 21 field :firstname, type: String, default: '' |
#gender ⇒ Symbol
Returns the way you prefer the application to gender you.
30 |
# File 'lib/virtuaservices/account.rb', line 30 enum_field :gender, [:female, :male, :neutral], default: :neutral |
#groups ⇒ Array<Virtuaservices::Permissions::Group>
Returns the groups giving their corresponding rights to the current account.
40 |
# File 'lib/virtuaservices/account.rb', line 40 has_and_belongs_to_many :groups, class_name: 'Virtuaservices::Permissions::Group', inverse_of: :accounts |
#language ⇒ Symbol
Returns the language preferred by this user.
27 |
# File 'lib/virtuaservices/account.rb', line 27 enum_field :language, [:en_GB, :fr_FR], default: :fr_FR |
#lastname ⇒ String
Returns the last name (family name) of the user.
18 |
# File 'lib/virtuaservices/account.rb', line 18 field :lastname, type: String, default: '' |
#password=(value) ⇒ String (writeonly)
Returns password, in clear, of the user ; do not attempt to get the value, just set it when changing the password.
36 |
# File 'lib/virtuaservices/account.rb', line 36 has_secure_password validations: false |
#password_confirmation=(value) ⇒ String (writeonly)
Returns the confirmation of the password, do not get, just set it ; it must be the same as the password.
36 |
# File 'lib/virtuaservices/account.rb', line 36 has_secure_password validations: false |
#password_digest ⇒ String (readonly)
Returns the password of the user, encrypted with the Blowfish algorithm.
15 |
# File 'lib/virtuaservices/account.rb', line 15 field :password_digest, type: String |
#services ⇒ Array<Virtuaservices::Monitoring::Service>
Returns the services created by this user.
47 |
# File 'lib/virtuaservices/account.rb', line 47 has_many :services, class_name: 'Virtuaservices::Monitoring::Service', inverse_of: :creator |
#sessions ⇒ Array<Virtuaservices::Authentication::Session>
Returns the sessions on which this account is, or has been logged in.
50 |
# File 'lib/virtuaservices/account.rb', line 50 has_many :sessions, class_name: 'Virtuaservices::Authentication::Session', inverse_of: :account |
#username ⇒ String
Returns the nickname the user chose at subscription, must be given, unique, and 6 or more characters long.
12 |
# File 'lib/virtuaservices/account.rb', line 12 field :username, type: String |
#websockets ⇒ Array<Virtuaservices::Monitoring::Websocket>
Returns the websockets created by the owner of this account.
53 |
# File 'lib/virtuaservices/account.rb', line 53 has_many :websockets, class_name: 'Virtuaservices::Monitoring::Websocket', inverse_of: :creator |