transferred Code Ocean from original repository to GitHub
This commit is contained in:
13
app/models/internal_user.rb
Normal file
13
app/models/internal_user.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class InternalUser < ActiveRecord::Base
|
||||
include User
|
||||
|
||||
authenticates_with_sorcery!
|
||||
|
||||
validates :email, presence: true, uniqueness: true
|
||||
validates :password, confirmation: true, on: :update, presence: true, unless: :activated?
|
||||
validates :role, inclusion: {in: ROLES}
|
||||
|
||||
def activated?
|
||||
activation_state == 'active'
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user