mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Refactor roles
This commit is contained in:
parent
b527221baf
commit
b0eb6798b0
16 changed files with 155 additions and 223 deletions
|
@ -6,7 +6,6 @@ class User < ActiveRecord::Base
|
|||
# After activisation, system should require to change temp password.
|
||||
# TODO: Estonian id validation
|
||||
|
||||
belongs_to :role
|
||||
belongs_to :country
|
||||
|
||||
validates :username, :password, presence: true
|
||||
|
@ -16,6 +15,8 @@ class User < ActiveRecord::Base
|
|||
|
||||
validate :validate_identity_code
|
||||
|
||||
ROLES = ['user', 'customer_service', 'admin']
|
||||
|
||||
def to_s
|
||||
username
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue