From ddf1f976775c3e064c09bd59674a303340c3773f Mon Sep 17 00:00:00 2001 From: sebalix Date: Thu, 10 Aug 2017 10:41:49 +0200 Subject: [PATCH] [FIX] auth_admin_passkey: normal users are not able to read the admin user email. If a normal user and the administrator have the same password, an AccessError is raised (email of the admin account can not be read) and no security alert is sent by email --- auth_admin_passkey/models/res_users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_admin_passkey/models/res_users.py b/auth_admin_passkey/models/res_users.py index ee68c8dfa..5b9815573 100644 --- a/auth_admin_passkey/models/res_users.py +++ b/auth_admin_passkey/models/res_users.py @@ -54,7 +54,7 @@ class ResUsers(models.Model): """ Send an email to the admin user to inform that another user has the same password as him.""" mail_obj = self.env['mail.mail'].sudo() - admin_user = self.browse(SUPERUSER_ID) + admin_user = self.sudo().browse(SUPERUSER_ID) if admin_user.email: mail_obj.create({