Add timeout to user
This commit is contained in:
parent
fbe2b26e9f
commit
9254b9960d
|
@ -3,7 +3,7 @@ class User
|
||||||
include Mongoid::Document
|
include Mongoid::Document
|
||||||
include Mongoid::Timestamps
|
include Mongoid::Timestamps
|
||||||
|
|
||||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable
|
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :timeoutable
|
||||||
|
|
||||||
mount_uploader :avatar, AvatarUploader
|
mount_uploader :avatar, AvatarUploader
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ Devise.setup do |config|
|
||||||
# The time you want to timeout the user session without activity. After this
|
# The time you want to timeout the user session without activity. After this
|
||||||
# time the user will be asked for credentials again.
|
# time the user will be asked for credentials again.
|
||||||
# config.timeout_in = 10.minutes
|
# config.timeout_in = 10.minutes
|
||||||
|
config.timeout_in = 10.minutes
|
||||||
|
|
||||||
# ==> Configuration for :lockable
|
# ==> Configuration for :lockable
|
||||||
# Defines which strategy will be used to lock an account.
|
# Defines which strategy will be used to lock an account.
|
||||||
|
|
Reference in New Issue