diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-07-08 05:31:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 05:31:28 +0200 |
commit | 771c9d4ba87a388dc306c58139d11bf510680c98 (patch) | |
tree | aca7d7031d7b462b27af6b47e2099ace81be1beb /app/policies | |
parent | 2e0eac71ddf0f5b61b6e395f57b7bc3f805cbf87 (diff) |
Add ability to skip sign-in token authentication for specific users (#16427)
Remove "active within last two weeks" exception for sign in token requirement Change admin reset password to lock access until the password is reset
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/user_policy.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/policies/user_policy.rb b/app/policies/user_policy.rb index d832bff75..6695a0ddf 100644 --- a/app/policies/user_policy.rb +++ b/app/policies/user_policy.rb @@ -13,6 +13,14 @@ class UserPolicy < ApplicationPolicy admin? && !record.staff? end + def disable_sign_in_token_auth? + staff? + end + + def enable_sign_in_token_auth? + staff? + end + def confirm? staff? && !record.confirmed? end |