Browse Source

Merge pull request #929 from osiell/10.0-auth_admin_passkey_fix

[FIX] auth_admin_passkey: normal users are not able to read the admin user email
pull/947/head
Dave Lasley 7 years ago
committed by GitHub
parent
commit
73ceb5b98a
  1. 2
      auth_admin_passkey/models/res_users.py

2
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 """ Send an email to the admin user to inform that
another user has the same password as him.""" another user has the same password as him."""
mail_obj = self.env['mail.mail'].sudo() mail_obj = self.env['mail.mail'].sudo()
admin_user = self.browse(SUPERUSER_ID)
admin_user = self.sudo().browse(SUPERUSER_ID)
if admin_user.email: if admin_user.email:
mail_obj.create({ mail_obj.create({

Loading…
Cancel
Save