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
c12a384b
Commit
c12a384b
authored
11 years ago
by
Florent Aide
Browse files
Options
Downloads
Patches
Plain Diff
MASSIVE commit. Working POC. This is just a POC. We'll need a lot of cleaning
parent
a9be410c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
__openerp__.py
+2
-0
2 additions, 0 deletions
__openerp__.py
res_config.py
+5
-5
5 additions, 5 deletions
res_config.py
res_users.py
+5
-1
5 additions, 1 deletion
res_users.py
res_users.xml
+1
-2
1 addition, 2 deletions
res_users.xml
with
13 additions
and
8 deletions
__openerp__.py
+
2
−
0
View file @
c12a384b
...
...
@@ -35,6 +35,8 @@
'
depends
'
:
[
'
base
'
,
'
web
'
,
'
base_setup
'
],
'
data
'
:
[
'
auth_saml_data.xml
'
,
'
res_users.xml
'
,
'
res_config.xml
'
,
'
auth_saml_view.xml
'
,
'
security/ir.model.access.csv
'
],
...
...
This diff is collapsed.
Click to expand it.
res_config.py
+
5
−
5
View file @
c12a384b
...
...
@@ -30,8 +30,8 @@
_inherit
=
'
base.config.settings
'
_columns
=
{
'
auth_saml_
authentic
_enabled
'
:
fields
.
boolean
(
'
Allow users to sign in with
Google
'
'
auth_saml_
local
_enabled
'
:
fields
.
boolean
(
'
Allow users to sign in with
a Local Authentic
'
),
}
...
...
@@ -35,7 +35,7 @@
),
}
def
get_
oauth
_providers
(
self
,
cr
,
uid
,
fields
,
context
=
None
):
def
get_
saml
_providers
(
self
,
cr
,
uid
,
fields
,
context
=
None
):
local_id
=
self
.
pool
.
get
(
'
ir.model.data
'
).
get_object_reference
(
cr
,
uid
,
'
auth_saml
'
,
'
provider_local
'
)[
1
]
...
...
@@ -45,6 +45,6 @@
)
return
{
'
auth_
oauth_google
_enabled
'
:
rl
[
0
][
'
enabled
'
],
'
auth_
saml_local
_enabled
'
:
rl
[
0
][
'
enabled
'
],
}
...
...
@@ -49,6 +49,6 @@
}
def
set_
oauth
_providers
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
def
set_
saml
_providers
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
local_id
=
self
.
pool
.
get
(
'
ir.model.data
'
).
get_object_reference
(
cr
,
uid
,
'
auth_saml
'
,
'
provider_local
'
)[
1
]
...
...
This diff is collapsed.
Click to expand it.
res_users.py
+
5
−
1
View file @
c12a384b
...
...
@@ -17,6 +17,6 @@
string
=
'
SAML Provider
'
,
),
'
saml_uid
'
:
fields
.
char
(
'
OAuth
User ID
'
,
'
SAML
User ID
'
,
help
=
"
SAML Provider user_id
"
,
),
...
...
@@ -21,5 +21,9 @@
help
=
"
SAML Provider user_id
"
,
),
'
saml_access_token
'
:
fields
.
char
(
'
Current SAML token for this user
'
,
help
=
"
The current SAML token in use
"
,
),
}
_sql_constraints
=
[
...
...
This diff is collapsed.
Click to expand it.
res_users.xml
+
1
−
2
View file @
c12a384b
...
...
@@ -10,5 +10,5 @@
<xpath
expr=
"//page[@string='Access Rights']"
position=
"after"
>
<page
string=
"SAML"
>
<group>
<field
name=
"saml_provider"
/>
<field
name=
"saml_provider
_id
"
/>
<field
name=
"saml_uid"
/>
...
...
@@ -14,5 +14,4 @@
<field
name=
"saml_uid"
/>
<field
name=
"saml_access_token"
/>
</group>
</page>
</xpath>
...
...
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