10 lines
191 B
Ruby
10 lines
191 B
Ruby
|
class ActiveGuard < Clearance::SignInGuard
|
||
|
def call
|
||
|
if signed_in? && !current_user.active
|
||
|
failure(t('sessions.new.deactivated_error'))
|
||
|
else
|
||
|
next_guard
|
||
|
end
|
||
|
end
|
||
|
end
|