mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Added Registrar roles with super, epp, billing
This commit is contained in:
parent
8371dcf46e
commit
5afa0ac793
12 changed files with 77 additions and 24 deletions
|
@ -15,11 +15,13 @@ class ApiUser < User
|
|||
belongs_to :registrar
|
||||
has_many :certificates
|
||||
|
||||
validates :username, :password, :registrar, presence: true
|
||||
validates :username, :password, :registrar, :roles, presence: true
|
||||
validates :username, uniqueness: true
|
||||
|
||||
attr_accessor :registrar_typeahead
|
||||
|
||||
ROLES = %w(super epp billing) # should not match to admin roles
|
||||
|
||||
def ability
|
||||
@ability ||= Ability.new(self)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue