60 lines
3.1 KiB
XML
60 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="0">
|
|
<!-- Security Groups for UDM Pro Integration -->
|
|
<!-- Defines two groups: Users (read-only) and Managers (full access) -->
|
|
<record id="module_category_udm_pro" model="ir.module.category">
|
|
<field name="name">UDM Pro Integration</field>
|
|
<field name="description">Manage UDM Pro configurations and network settings</field>
|
|
<field name="sequence">50</field>
|
|
</record>
|
|
|
|
<!-- User Group: Read-only access to configurations and network data -->
|
|
<!-- Members can view settings but cannot modify them -->
|
|
<record id="group_udm_pro_user" model="res.groups">
|
|
<field name="name">User</field>
|
|
<field name="category_id" ref="unifi_integration.module_category_udm_pro"/>
|
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
|
</record>
|
|
|
|
<!-- Manager Group: Full access to all UDM Pro features -->
|
|
<!-- Members can create, edit, delete configurations and perform network operations -->
|
|
<record id="group_udm_pro_manager" model="res.groups">
|
|
<field name="name">Manager</field>
|
|
<field name="category_id" ref="unifi_integration.module_category_udm_pro"/>
|
|
<field name="implied_ids" eval="[(4, ref('unifi_integration.group_udm_pro_user'))]"/>
|
|
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
|
|
</record>
|
|
</data>
|
|
|
|
<data noupdate="1">
|
|
<!-- Record-Level Access Rules -->
|
|
<!-- Define permissions for different user groups -->
|
|
|
|
<!-- User Group Rule: Read-only access -->
|
|
<!-- Allows viewing but prevents any modifications -->
|
|
<record id="rule_udm_configuration_user" model="ir.rule">
|
|
<field name="name">UDM Pro Configuration User Access</field>
|
|
<field name="model_id" ref="unifi_integration.model_udm_configuration"/>
|
|
<field name="domain_force">[(1, '=', 1)]</field>
|
|
<field name="groups" eval="[(4, ref('unifi_integration.group_udm_pro_user'))]"/>
|
|
<field name="perm_read" eval="True"/>
|
|
<field name="perm_write" eval="False"/>
|
|
<field name="perm_create" eval="False"/>
|
|
<field name="perm_unlink" eval="False"/>
|
|
</record>
|
|
|
|
<!-- Manager Group Rule: Full access -->
|
|
<!-- Allows all operations including create, read, update, and delete -->
|
|
<record id="rule_udm_configuration_manager" model="ir.rule">
|
|
<field name="name">UDM Pro Configuration Manager Access</field>
|
|
<field name="model_id" ref="unifi_integration.model_udm_configuration"/>
|
|
<field name="domain_force">[(1, '=', 1)]</field>
|
|
<field name="groups" eval="[(4, ref('unifi_integration.group_udm_pro_manager'))]"/>
|
|
<field name="perm_read" eval="True"/>
|
|
<field name="perm_write" eval="True"/>
|
|
<field name="perm_create" eval="True"/>
|
|
<field name="perm_unlink" eval="True"/>
|
|
</record>
|
|
</data>
|
|
</odoo>
|