mirror of
https://github.com/bringout/oca-ocb-security.git
synced 2026-04-19 18:12:03 +02:00
19.0 vanilla
This commit is contained in:
parent
20ddc1b4a3
commit
c0efcc53f5
1162 changed files with 125577 additions and 105287 deletions
|
|
@ -1,38 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="providers" name="OAuth Providers">
|
||||
<t t-if="len(providers) > 0">
|
||||
<em t-attf-class="d-block text-center text-muted small my-#{len(providers) if len(providers) < 3 else 3}">- or -</em>
|
||||
<div class="o_auth_oauth_providers list-group mt-1 mb-1 text-start">
|
||||
<a t-foreach="providers" t-as="p" class="list-group-item list-group-item-action py-2" t-att-href="p['auth_link']">
|
||||
<i t-att-class="p['css_class']"/>
|
||||
<t t-esc="p['body']"/>
|
||||
</a>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="login" inherit_id="web.login" name="OAuth Login buttons">
|
||||
<xpath expr="//form" position="before">
|
||||
<t t-set="form_small" t-value="True" t-if="len(providers) > 2"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_login_auth')]" position="inside">
|
||||
<t t-call="auth_oauth.providers"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="signup" inherit_id="auth_signup.signup" name="OAuth Signup buttons">
|
||||
<xpath expr="//form" position="before">
|
||||
<t t-set="form_small" t-value="True"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_login_auth')]" position="inside">
|
||||
<t t-call="auth_oauth.providers"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="reset_password" inherit_id="auth_signup.reset_password" name="OAuth Reset Password buttons">
|
||||
<xpath expr="//div[hasclass('o_login_auth')]" position="inside">
|
||||
<t t-call="auth_oauth.providers"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="providers" inherit_id="web.login_oauth" name="OAuth Providers">
|
||||
<xpath expr="//t[@t-set='auth_btns']" position="after">
|
||||
<t t-set="auth_btns" t-value="providers + auth_btns"/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -24,21 +24,21 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="view_oauth_provider_tree" model="ir.ui.view">
|
||||
<field name="name">auth.oauth.provider.tree</field>
|
||||
<field name="name">auth.oauth.provider.list</field>
|
||||
<field name="model">auth.oauth.provider</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="arch">
|
||||
<list string="arch">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" />
|
||||
<field name="client_id" />
|
||||
<field name="enabled" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_oauth_provider" model="ir.actions.act_window">
|
||||
<field name="name">Providers</field>
|
||||
<field name="res_model">auth.oauth.provider</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
<menuitem id="menu_oauth_providers" name="OAuth Providers"
|
||||
parent="base.menu_users" sequence="30"
|
||||
|
|
|
|||
|
|
@ -6,35 +6,24 @@
|
|||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_module_auth_oauth" position="replace">
|
||||
<div class="content-group" attrs="{'invisible': [('module_auth_oauth','=',False)]}">
|
||||
<div class="content-group" invisible="not module_auth_oauth">
|
||||
<div class="mt8">
|
||||
<button type="action" name="%(auth_oauth.action_oauth_provider)d" string="OAuth Providers" icon="fa-arrow-right" class="btn-link"/>
|
||||
<button type="action" name="%(auth_oauth.action_oauth_provider)d" string="OAuth Providers" icon="oi-arrow-right" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="module_auth_oauth" position="after">
|
||||
<div class="col-12 col-lg-6 o_setting_box"
|
||||
id="signin_google_setting"
|
||||
attrs="{'invisible': [('module_auth_oauth','=',False)]}">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="auth_oauth_google_enabled"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Google Authentication" for="auth_oauth_google_enabled"/>
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/general/auth/google.html" title="Documentation" class="o_doc_link" target="_blank"></a>
|
||||
<div class="text-muted">
|
||||
Allow users to sign in with their Google account
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('auth_oauth_google_enabled','=',False)]}">
|
||||
<div class="row mt16">
|
||||
<label for="auth_oauth_google_client_id" string="Client ID:" class="col-lg-3 o_light_label"/>
|
||||
<field name="auth_oauth_google_client_id" placeholder="e.g. 1234-xyz.apps.googleusercontent.com"/>
|
||||
</div>
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/general/auth/google.html" target="_blank"><i class="fa fa-fw fa-arrow-right"/>Tutorial</a>
|
||||
<setting id="module_auth_oauth" position="after">
|
||||
<setting id="signin_google_setting" string="Google Authentication" help="Allow users to sign in with their Google account" documentation="/applications/general/auth/google.html" invisible="not module_auth_oauth">
|
||||
<field name="auth_oauth_google_enabled"/>
|
||||
<div class="content-group" invisible="not auth_oauth_google_enabled">
|
||||
<div class="row mt16">
|
||||
<label for="auth_oauth_google_client_id" string="Client ID:" class="col-lg-3 o_light_label"/>
|
||||
<field name="auth_oauth_google_client_id" placeholder="e.g. 1234-xyz.apps.googleusercontent.com"/>
|
||||
</div>
|
||||
<widget name="documentation_link" path="/applications/general/auth/google.html" icon="oi oi-fw oi-arrow-right" label="Tutorial"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</setting>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_users_form" model="ir.ui.view">
|
||||
<field name="name">res.users.form.inherit</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='preferences']" position="after">
|
||||
<page string="Oauth" name="oauth">
|
||||
<group>
|
||||
<field name="oauth_provider_id"/>
|
||||
<field name="oauth_uid"/>
|
||||
<field name="oauth_access_token"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue