Skip to content

Commit

Permalink
[15.0][IMP] bi_view_editor: Restrict access to non BI View Editor Man…
Browse files Browse the repository at this point in the history
…ager users
  • Loading branch information
yankinmax committed Oct 19, 2023
1 parent 40594cf commit 4eadad5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions bi_view_editor/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"deb": ["graphviz"],
},
"data": [
"security/res_groups.xml",
"security/ir.model.access.csv",
"security/rules.xml",
"views/bve_view.xml",
Expand Down
6 changes: 4 additions & 2 deletions bi_view_editor/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_bve_view_everyone,bve.view,bi_view_editor.model_bve_view,,1,1,1,1
access_bve_view_line,access_bve_view_line,model_bve_view_line,,1,1,1,1
access_bve_view_everyone_user,bve.view.user,bi_view_editor.model_bve_view,,0,0,0,0
access_bve_view_everyone_manager,bve.view.manager,bi_view_editor.model_bve_view,bi_view_editor.group_bve_manager,1,1,1,1
access_bve_view_line_user,access_bve_view_line_user,bi_view_editor.model_bve_view_line,,0,0,0,0
access_bve_view_line_manager,access_bve_view_line_manager,bi_view_editor.model_bve_view_line,bi_view_editor.group_bve_manager,1,1,1,1
14 changes: 14 additions & 0 deletions bi_view_editor/security/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="group_bve_manager" model="res.groups">
<field name="name">BI View Editor Manager</field>
<field name="category_id" ref="base.module_category_hidden" />
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
<field
name="users"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
/>
</record>

</odoo>
1 change: 1 addition & 0 deletions bi_view_editor/views/bve_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,6 @@
id="menu_bi_view_editor_view"
parent="menu_bi_view_editor_custom_reports"
action="action_bi_view_editor_view_form"
groups="bi_view_editor.group_bve_manager"
/>
</odoo>

0 comments on commit 4eadad5

Please sign in to comment.