Skip to content
Snippets Groups Projects
Commit eeb618d63ccf authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Clear out the user's password when setting an SAML user ID

parent 1a580167860a
No related branches found
No related tags found
No related merge requests found
...@@ -194,3 +194,15 @@ ...@@ -194,3 +194,15 @@
# TODO: maybe raise a defined exception instead of the last # TODO: maybe raise a defined exception instead of the last
# exception that occurred in our execution frame # exception that occurred in our execution frame
raise raise
def write(self, cr, uid, ids, vals, context=None):
"""Override to clear out the user's password when setting an SAML user
ID (as they can't cohabit).
"""
if vals and vals.get('saml_uid'):
vals['password'] = False
return super(res_users, self).write(
cr, uid, ids, vals, context=context
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment