Methods
Included Modules
- DeviseTokenAuth::Concerns::User
Class Public methods
devise_modules_to_load()
Link
Source: show
# File rhino/rhino/app/models/rhino/user.rb 15 def self.devise_modules_to_load 16 modules = %i[database_authenticatable registerable recoverable rememberable trackable validatable confirmable omniauthable] 17 modules.push :invitable if Rhino.resources.include?("Organization") 18 end
roles_for_auth(auth_owner, record = nil)
Link
Source: show
# File rhino/rhino/app/models/rhino/user.rb 31 def self.roles_for_auth(auth_owner, record = nil) 32 return {} unless auth_owner 33 34 # If user is logged in, but no record, they are still an admin for their data 35 # Otherwise owner must match to be an admin 36 # A list of roles as hash keys with an array of base_owners for each 37 return { 'admin': [auth_owner] } if !record.respond_to?(:base_owner_ids) || record.base_owner_ids.include?(auth_owner&.id) 38 39 {} 40 end
Instance Public methods