diff options
author | Emelia Smith <ThisIsMissEm@users.noreply.github.com> | 2018-04-10 09:16:06 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-04-10 09:16:06 +0200 |
commit | 219a4423d8371fc89f122f3ef4874e9121b423f7 (patch) | |
tree | 89e645fec9b8effde9d496269dc0f16dd2dbd7ea /app/policies | |
parent | e6e93ecd8a45cea5f0c398054c2292a5fdf944cf (diff) |
Feature: Allow staff to change user emails (#7074)
* Admin: Show unconfirmed email address on account page * Admin: Allow staff to change user email addresses * ActionLog: On change_email, log current email address and new unconfirmed email address
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/user_policy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/user_policy.rb b/app/policies/user_policy.rb index aae207d06..dabdf707a 100644 --- a/app/policies/user_policy.rb +++ b/app/policies/user_policy.rb @@ -5,6 +5,10 @@ class UserPolicy < ApplicationPolicy staff? && !record.staff? end + def change_email? + staff? && !record.staff? + end + def disable_2fa? admin? && !record.staff? end |