Skip to content
Permalink
Browse files

😍 User-access: user (reader) or manager (configuration)

  • Loading branch information...
fedoranvar committed Aug 21, 2019
1 parent 5d60e5f commit ae1fa3a53d14430762ccf21620670c1bd72bf6cf
@@ -24,6 +24,7 @@
],
"external_dependencies": {"python": ['bravado_core', 'swagger_spec_validator'], "bin": []},
"data": [
"security/openapi_security.xml",
"security/ir.model.access.csv",
"views/assets.xml",
"views/openapi_view.xml",
@@ -34,6 +35,7 @@
"views/assets_demo.xml",
"views/tour_views.xml",
"data/openapi_demo.xml",
"demo/openapi_security_demo.xml",
],
"qweb": [
"static/src/xml/dashboard.xml",
@@ -0,0 +1,7 @@
<!-- Copyright 2019 Anvar Kildebekov <https://it-projects.info/team/fedoranvar>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).-->
<odoo>
<record model="res.groups" id="openapi.group_user">
<field name="users" eval="[(4, ref('base.user_demo'))]"/>
</record>
</odoo>
@@ -1,5 +1,9 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
access_openapi_log,access_openapi_log,model_openapi_log,,1,0,1,0
access_openapi_namespace,access_openapi_namespace,model_openapi_namespace,,1,0,0,0
access_openapi_access,access_openapi_access,model_openapi_access,,1,0,0,0
access_openapi_access_create_context,access_openapi_access_create_context,model_openapi_access_create_context,,1,0,0,0
access_openapi_log,access_openapi_log,model_openapi_log,openapi.group_user,1,1,0,0
access_openapi_namespace,access_openapi_namespace,model_openapi_namespace,openapi.group_user,1,1,0,0
access_openapi_access,access_openapi_access,model_openapi_access,openapi.group_user,1,1,0,0
access_openapi_access_create_context,access_openapi_access_create_context,model_openapi_access_create_context,openapi.group_user,1,1,0,0
access_openapi_log,access_openapi_log,model_openapi_log,openapi.group_manager,1,1,1,1
access_openapi_namespace,access_openapi_namespace,model_openapi_namespace,openapi.group_manager,1,1,1,1
access_openapi_access,access_openapi_access,model_openapi_access,openapi.group_manager,1,1,1,1
access_openapi_access_create_context,access_openapi_access_create_context,model_openapi_access_create_context,openapi.group_manager,1,1,1,1
@@ -0,0 +1,22 @@
<!-- Copyright 2019 Anvar Kildebekov <https://it-projects.info/team/fedoranvar>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).-->
<odoo>
<record model="ir.module.category" id="module_management">
<field name="name">OpenAPI</field>
<field name="description">User access level for OpenAPI</field>
<field name="sequence">4</field>
</record>

<record model="res.groups" id="group_user">
<field name="name">User</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="openapi.module_management"/>
</record>

<record model="res.groups" id="group_manager">
<field name="name">Manager</field>
<field name="implied_ids" eval="[(4, ref('openapi.group_user'))]"/>
<field name="users" eval="[(4, ref('base.partner_root')), (4, ref('base.user_root'))]"/>
<field name="category_id" ref="openapi.module_management"/>
</record>
</odoo>

0 comments on commit ae1fa3a

Please sign in to comment.
You can’t perform that action at this time.