Skip to content
Permalink
Browse files

🔒 Created access level: "User", "Manager"

  • Loading branch information...
fedoranvar committed Aug 1, 2019
1 parent 68bad7f commit 983af5954fbe1fe65f8971000e77906c92215c92
Showing with 36 additions and 9 deletions.
  1. +2 −3 saas/README.rst
  2. +2 −0 saas/__manifest__.py
  3. +12 −6 saas/security/ir.model.access.csv
  4. +20 −0 saas/security/saas_security.xml
@@ -14,7 +14,7 @@ Models overview
===============

* ``saas.template`` -- similar to ``saas_portal.plan`` in *odoo-saas-tools*, but covers only technical aspects (database creation) and not any sale/trial stuff. A single record can be used for multiple servers (via ``saas.template.operator``.
* ``saas.operator`` -- similar to ``saas_portal.server`` in *odoo-saas-tools*. Credentials to create-destroy, update, migrate, backup, etc. odoo instances.
* ``saas.operator`` -- similar to ``saas_portal.server`` in *odoo-saas-tools*. Credentials to create-destroy, update, migrate, backup, etc. odoo instances.

* It doesn't need special odoo instance (database, *SaaS Server* in terms of
*odoo-saas-tool* project) in corresponding server and could work by sending
@@ -33,7 +33,6 @@ Models overview
Roadmap
=======

* TODO: create saas access levels (SaaS: User, Manager)
* TODO: Create menu for SaaS Operator
* smart button for builds list
* TODO: Create menu for SaaS Log model
@@ -80,4 +79,4 @@ Changelog: `<doc/changelog.rst>`_

Notifications on updates: `via Atom <https://github.com/it-projects-llc/saas-addons/commits/12.0/saas.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/saas-addons/commits/12.0/saas.atom>`_

Tested on Odoo 12.0 032d0ed90f580f25819cd6846e21cf155ade44e7
Tested on Odoo 12.0 4147ef847a1c5182b9f3b7daad504bf8b813190c
@@ -1,4 +1,5 @@
# Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2019 Anvar Kildebekov <https://it-projects.info/team/kildebekov>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": """SaaS Base""",
@@ -23,6 +24,7 @@
],
"external_dependencies": {"python": ['slugify'], "bin": []},
"data": [
"security/saas_security.xml",
"security/ir.model.access.csv",
"views/saas_view.xml",
"views/saas_template_views.xml",
@@ -1,7 +1,13 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_saas_db,access_saas_db,model_saas_db,base.group_user,1,0,0,0
access_saas_template_operator,access_saas_template_operator,model_saas_template_operator,base.group_user,1,1,1,0
access_saas_log,access_saas_log,model_saas_log,base.group_user,1,0,1,0
access_saas_operator,access_saas_operator,model_saas_operator,base.group_user,1,1,1,0
access_saas_template,access_saas_template,model_saas_template,base.group_user,1,1,1,1
access_saas_module,access_saas_module,model_saas_module,base.group_user,1,1,1,1
user_access_saas_module,user_access_saas_module,model_saas_module,saas.group_user,1,0,1,0
user_access_saas_template,user_access_saas_template,model_saas_template,saas.group_user,1,0,0,0
user_access_saas_db,user_access_saas_db,model_saas_db,saas.group_user,1,0,0,0
user_access_saas_template_operator,user_access_saas_template_operator,model_saas_template_operator,saas.group_user,1,0,0,0
user_access_saas_log,user_access_saas_log,model_saas_log,saas.group_user,1,0,0,0
user_access_saas_operator,user_access_saas_operator,model_saas_operator,saas.group_user,1,0,0,0
manager_access_saas_db,manager_access_saas_db,model_saas_db,saas.group_manager,1,0,0,0
manager_access_saas_template_operator,manager_access_saas_template_operator,model_saas_template_operator,saas.group_manager,1,1,1,0
manager_access_saas_log,manager_access_saas_log,model_saas_log,saas.group_manager,1,0,1,0
manager_access_saas_operator,manager_access_saas_operator,model_saas_operator,saas.group_manager,1,1,1,0
manager_access_saas_template,manager_access_saas_template,model_saas_template,saas.group_manager,1,1,1,1
manager_access_saas_module,manager_access_saas_module,model_saas_module,saas.group_manager,1,1,1,1
@@ -0,0 +1,20 @@
<odoo>
<record model="ir.module.category" id="module_management">
<field name="name">SaaS</field>
<field name="description">User access level for SaaS</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="users" eval="[(4, ref('base.user_root'))]"/>
<field name="category_id" ref="saas.module_management"/>
</record>

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

0 comments on commit 983af59

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