Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auth_saml
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
auth_saml
Commits
eeb618d63ccf
Commit
eeb618d63ccf
authored
10 years ago
by
Houzefa Abbasbhay
Browse files
Options
Downloads
Patches
Plain Diff
Clear out the user's password when setting an SAML user ID
parent
1a580167860a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
model/res_users.py
+12
-0
12 additions, 0 deletions
model/res_users.py
with
12 additions
and
0 deletions
model/res_users.py
+
12
−
0
View file @
eeb618d6
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment