Skip to content

Commit

Permalink
fix(user): remove password update notification feature for secu… (#8449)
Browse files Browse the repository at this point in the history
  • Loading branch information
netchampfaris committed Sep 23, 2019
1 parent ab86a89 commit b6ed895
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
10 changes: 1 addition & 9 deletions frappe/core/doctype/user/user.json
Expand Up @@ -38,7 +38,6 @@
"mute_sounds",
"change_password",
"new_password",
"send_password_update_notification",
"logout_all_sessions",
"reset_password_key",
"last_password_reset_date",
Expand Down Expand Up @@ -299,13 +298,6 @@
"label": "Set New Password",
"no_copy": 1
},
{
"default": "0",
"depends_on": "eval:!doc.__islocal",
"fieldname": "send_password_update_notification",
"fieldtype": "Check",
"label": "Send Password Update Notification"
},
{
"default": "0",
"fieldname": "logout_all_sessions",
Expand Down Expand Up @@ -593,7 +585,7 @@
"idx": 413,
"image_field": "user_image",
"max_attachments": 5,
"modified": "2019-08-09 10:34:56.912283",
"modified": "2019-09-18 14:14:01.233124",
"modified_by": "Administrator",
"module": "Core",
"name": "User",
Expand Down
8 changes: 0 additions & 8 deletions frappe/core/doctype/user/user.py
Expand Up @@ -153,10 +153,6 @@ def email_new_password(self, new_password=None):
if new_password and not self.flags.in_insert:
_update_password(user=self.name, pwd=new_password, logout_all_sessions=self.logout_all_sessions)

if self.send_password_update_notification and self.enabled:
self.password_update_mail(new_password)
frappe.msgprint(_("New password emailed"))

def set_system_user(self):
'''Set as System User if any of the given roles has desk_access'''
if self.has_desk_access() or self.name == 'Administrator':
Expand Down Expand Up @@ -250,10 +246,6 @@ def password_reset_mail(self, link):
self.send_login_mail(_("Password Reset"),
"password_reset", {"link": link}, now=True)

def password_update_mail(self, password):
self.send_login_mail(_("Password Update"),
"password_update", {"new_password": password}, now=True)

def send_welcome_mail_to_user(self):
from frappe.utils import get_url
link = self.reset_password()
Expand Down
4 changes: 0 additions & 4 deletions frappe/templates/emails/password_update.html

This file was deleted.

0 comments on commit b6ed895

Please sign in to comment.