Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1615205
user.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Mar 21, 10:04 PM
Size
691 B
Mime Type
text/x-ruby
Expires
Mon, Mar 23, 10:04 PM (1 d, 1 h)
Engine
blob
Format
Raw Data
Handle
354322
Attached To
rWEBDNS WebDNS (edet4)
user.rb
View Options
class
User
<
ActiveRecord
::
Base
devise
:database_authenticatable
,
:registerable
,
:recoverable
,
:rememberable
,
:trackable
,
:validatable
has_many
:memberships
has_many
:groups
,
through
:
:memberships
scope
:orphans
,
->
{
includes
(
:memberships
)
.
where
(
:memberships
=>
{
user_id
:
nil
})
}
# Check if the user can change his password
#
# Remote users are not able to change their password
def
can_change_password?
!
identifier?
end
def
self
.
find_for_database_authentication
(
conditions
)
# Override devise method for database auth
# We only want to auth local user via the database.
find_first_by_auth_conditions
(
conditions
,
identifier
:
''
)
end
end
Event Timeline
Log In to Comment