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
bcd11c9d1587
Commit
bcd11c9d1587
authored
8 years ago
by
Houzefa Abbasbhay
Browse files
Options
Downloads
Patches
Plain Diff
Don't bork other auth addons when using this one
parent
715ccc1ac22d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
model/res_users.py
+7
-12
7 additions, 12 deletions
model/res_users.py
with
7 additions
and
12 deletions
model/res_users.py
+
7
−
12
View file @
bcd11c9d
...
@@ -6,8 +6,9 @@
...
@@ -6,8 +6,9 @@
import
passlib
import
passlib
import
openerp
import
openerp
from
openerp
import
_
from
openerp
import
api
from
openerp
import
api
from
openerp
import
models
from
openerp
import
models
from
openerp
import
fields
from
openerp
import
fields
from
openerp
import
SUPERUSER_ID
from
openerp
import
SUPERUSER_ID
from
openerp.exceptions
import
ValidationError
from
openerp.exceptions
import
ValidationError
...
@@ -9,13 +10,9 @@
...
@@ -9,13 +10,9 @@
from
openerp
import
api
from
openerp
import
api
from
openerp
import
models
from
openerp
import
models
from
openerp
import
fields
from
openerp
import
fields
from
openerp
import
SUPERUSER_ID
from
openerp
import
SUPERUSER_ID
from
openerp.exceptions
import
ValidationError
from
openerp.exceptions
import
ValidationError
# import real addons name of base.res.res_users in order to call it without
# user the super() call
from
openerp.addons.base.res.res_users
import
res_users
as
baseuser
from
openerp
import
_
_logger
=
logging
.
getLogger
(
__name__
)
_logger
=
logging
.
getLogger
(
__name__
)
...
@@ -18,8 +15,11 @@
...
@@ -18,8 +15,11 @@
_logger
=
logging
.
getLogger
(
__name__
)
_logger
=
logging
.
getLogger
(
__name__
)
class
res_users
(
models
.
Model
):
class
ResUser
(
models
.
Model
):
"""
Add SAML login capabilities to Odoo users.
"""
_inherit
=
'
res.users
'
_inherit
=
'
res.users
'
saml_provider_id
=
fields
.
Many2one
(
saml_provider_id
=
fields
.
Many2one
(
...
@@ -232,12 +232,7 @@
...
@@ -232,12 +232,7 @@
token_osv
=
self
.
pool
.
get
(
'
auth_saml.token
'
)
token_osv
=
self
.
pool
.
get
(
'
auth_saml.token
'
)
try
:
try
:
baseuser
.
check_credentials
(
super
(
ResUser
,
self
).
check_credentials
(
cr
,
uid
,
token
)
self
,
cr
,
uid
,
token
)
except
(
except
(
openerp
.
exceptions
.
AccessDenied
,
openerp
.
exceptions
.
AccessDenied
,
...
@@ -279,7 +274,7 @@
...
@@ -279,7 +274,7 @@
'
password_crypt
'
:
False
,
'
password_crypt
'
:
False
,
})
})
return
super
(
r
es
_u
ser
s
,
self
).
write
(
vals
)
return
super
(
R
es
U
ser
,
self
).
write
(
vals
)
@api.model
@api.model
def
_allow_saml_and_password
(
self
):
def
_allow_saml_and_password
(
self
):
...
...
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