Class: Arkaan::Account
- Inherits:
-
Object
- Object
- Arkaan::Account
- Includes:
- ActiveModel::SecurePassword, Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/arkaan/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<Arkaan::OAuth::Application] the applications this user has created and owns.
Array<Arkaan::OAuth::Application] the applications this user has created and owns.
-
#authorizations ⇒ Array<Arkaan::OAuth::Authorization>
The authorization issued by this account to third-party applications to access its data.
-
#campaigns ⇒ Array<Arkaan::Campaign>
The campaigns this account has created.
-
#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.
-
#groups ⇒ Array<Arkaan::Permissions::Group>
The groups giving their corresponding rights to the current account.
-
#invitations ⇒ Array<Arkaan::Campaigns::Invitation>
The invitations you’ve issued yourself to other players.
-
#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.
-
#phones ⇒ Array<Arkaan::Phone>
The phone numbers given by the user.
-
#services ⇒ Array<Arkaan::Monitoring::Service>
The services created by this user.
-
#sessions ⇒ Array<Arkaan::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<Arkaan::Monitoring::Websocket>
The websockets created by the owner of this account.
Instance Attribute Details
#applications ⇒ Array<Arkaan::OAuth::Application] the applications this user has created and owns.
Returns Array<Arkaan::OAuth::Application] the applications this user has created and owns.
37 |
# File 'lib/arkaan/account.rb', line 37 has_many :applications, class_name: 'Arkaan::OAuth::Application', inverse_of: :creator |
#authorizations ⇒ Array<Arkaan::OAuth::Authorization>
Returns the authorization issued by this account to third-party applications to access its data.
40 |
# File 'lib/arkaan/account.rb', line 40 has_many :authorizations, class_name: 'Arkaan::OAuth::Authorization', inverse_of: :account |
#campaigns ⇒ Array<Arkaan::Campaign>
Returns the campaigns this account has created.
49 |
# File 'lib/arkaan/account.rb', line 49 has_many :campaigns, class_name: 'Arkaan::Campaign', 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.
23 |
# File 'lib/arkaan/account.rb', line 23 field :email, type: String |
#firstname ⇒ String
Returns the first name of the user.
20 |
# File 'lib/arkaan/account.rb', line 20 field :firstname, type: String, default: '' |
#groups ⇒ Array<Arkaan::Permissions::Group>
Returns the groups giving their corresponding rights to the current account.
33 |
# File 'lib/arkaan/account.rb', line 33 has_and_belongs_to_many :groups, class_name: 'Arkaan::Permissions::Group', inverse_of: :accounts |
#invitations ⇒ Array<Arkaan::Campaigns::Invitation>
Returns the invitations you’ve issued yourself to other players.
52 |
# File 'lib/arkaan/account.rb', line 52 has_many :invitations, class_name: 'Arkaan::Campaigns::Invitation', inverse_of: :account |
#lastname ⇒ String
Returns the last name (family name) of the user.
17 |
# File 'lib/arkaan/account.rb', line 17 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.
29 |
# File 'lib/arkaan/account.rb', line 29 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.
29 |
# File 'lib/arkaan/account.rb', line 29 has_secure_password validations: false |
#password_digest ⇒ String (readonly)
Returns the password of the user, encrypted with the Blowfish algorithm.
14 |
# File 'lib/arkaan/account.rb', line 14 field :password_digest, type: String |
#phones ⇒ Array<Arkaan::Phone>
Returns the phone numbers given by the user.
62 |
# File 'lib/arkaan/account.rb', line 62 :phones, class_name: 'Arkaan::Phone', inverse_of: :account |
#services ⇒ Array<Arkaan::Monitoring::Service>
Returns the services created by this user.
43 |
# File 'lib/arkaan/account.rb', line 43 has_many :services, class_name: 'Arkaan::Monitoring::Service', inverse_of: :creator |
#sessions ⇒ Array<Arkaan::Authentication::Session>
Returns the sessions on which this account is, or has been logged in.
46 |
# File 'lib/arkaan/account.rb', line 46 has_many :sessions, class_name: 'Arkaan::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.
11 |
# File 'lib/arkaan/account.rb', line 11 field :username, type: String |
#websockets ⇒ Array<Arkaan::Monitoring::Websocket>
Returns the websockets created by the owner of this account.
58 |
# File 'lib/arkaan/account.rb', line 58 has_many :websockets, class_name: 'Arkaan::Monitoring::Websocket', inverse_of: :creator |