0
0
Fork 0

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
This commit is contained in:
Emelia Smith 2018-04-10 09:16:06 +02:00 committed by Eugen Rochko
parent e6e93ecd8a
commit 219a4423d8
10 changed files with 131 additions and 2 deletions

View file

@ -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