forked from External/greenlight
Added extra check for reset password (#745)
This commit is contained in:
parent
589536b18d
commit
ea8acaff4c
|
@ -130,7 +130,9 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def can_reset_password
|
def can_reset_password
|
||||||
# Check if admin is editting user
|
# Check if admin is editting user and user is a greenlight account
|
||||||
Rails.application.routes.recognize_path(request.env['PATH_INFO'])[:action] == "edit_user"
|
Rails.configuration.enable_email_verification &&
|
||||||
|
Rails.application.routes.recognize_path(request.env['PATH_INFO'])[:action] == "edit_user" &&
|
||||||
|
@user.greenlight_account?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue