Skip to content
Snippets Groups Projects
Commit c12a384b authored by Florent Aide's avatar Florent Aide
Browse files

MASSIVE commit. Working POC. This is just a POC. We'll need a lot of cleaning

parent a9be410c
No related branches found
No related tags found
No related merge requests found
......@@ -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'
],
......
......@@ -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]
......
......@@ -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 = [
......
......@@ -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>
......
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