mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Specify Devise modules for each type of user
This commit is contained in:
parent
02137b620e
commit
c31f507c25
4 changed files with 4 additions and 2 deletions
|
@ -9,7 +9,7 @@ class AdminUser < User
|
||||||
|
|
||||||
ROLES = %w(user customer_service admin) # should not match to api_users roles
|
ROLES = %w(user customer_service admin) # should not match to api_users roles
|
||||||
|
|
||||||
devise :database_authenticatable, :trackable, :validatable
|
devise :database_authenticatable, :trackable, :validatable, :timeoutable
|
||||||
|
|
||||||
def self.min_password_length
|
def self.min_password_length
|
||||||
Devise.password_length.min
|
Devise.password_length.min
|
||||||
|
|
|
@ -2,6 +2,7 @@ require 'open3'
|
||||||
|
|
||||||
class ApiUser < User
|
class ApiUser < User
|
||||||
include EppErrors
|
include EppErrors
|
||||||
|
devise :database_authenticatable, :trackable, :timeoutable
|
||||||
|
|
||||||
def epp_code_map
|
def epp_code_map
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,8 @@ class RegistrantUser < User
|
||||||
ACCEPTED_ISSUER = 'AS Sertifitseerimiskeskus'
|
ACCEPTED_ISSUER = 'AS Sertifitseerimiskeskus'
|
||||||
attr_accessor :idc_data
|
attr_accessor :idc_data
|
||||||
|
|
||||||
|
devise :database_authenticatable, :trackable, :timeoutable
|
||||||
|
|
||||||
def ability
|
def ability
|
||||||
@ability ||= Ability.new(self)
|
@ability ||= Ability.new(self)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
include Versions # version/user_version.rb
|
include Versions # version/user_version.rb
|
||||||
devise :trackable, :timeoutable
|
|
||||||
|
|
||||||
attr_accessor :phone
|
attr_accessor :phone
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue