feat: Implement user access rights export wizard.
This commit is contained in:
parent
01f4ad9971
commit
efc79d193a
62
README.md
62
README.md
@ -1,32 +1,32 @@
|
||||
# User Access Rights Export
|
||||
|
||||
Generate an Excel workbook that consolidates the access rights of every user in your Odoo 17 instance.
|
||||
|
||||
## Features
|
||||
|
||||
* One-click wizard accessible to system administrators.
|
||||
* Summary worksheet listing all users with counts of granted ACLs and record rules.
|
||||
* Summary worksheet listing each security group with user counts, ACL totals, and record rule totals.
|
||||
* Dedicated worksheet per user including:
|
||||
* Model access control list (CRUD) permissions derived from `ir.model.access`.
|
||||
* Record rule visibility and domain definitions from `ir.rule`.
|
||||
* Dedicated worksheet per security group including:
|
||||
* Group-specific ACL permissions.
|
||||
* Record rules that apply to the group.
|
||||
* Workbook generated entirely in-memory using `xlsxwriter`.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Copy the `user_access_rights_export` directory into your Odoo addons path.
|
||||
2. Update your addons list and install the module via Apps.
|
||||
3. Requires the Python package `xlsxwriter` (bundled with standard Odoo installations).
|
||||
|
||||
## Usage
|
||||
|
||||
1. Navigate to **Settings → Technical → User Access Rights Export**.
|
||||
2. Click **Generate**. The module will produce and download an `.xlsx` file.
|
||||
3. Open the Excel file to inspect summary metrics and per-user details.
|
||||
|
||||
## Security
|
||||
|
||||
# User Access Rights Export
|
||||
|
||||
Generate an Excel workbook that consolidates the access rights of every user in your Odoo 17 instance.
|
||||
|
||||
## Features
|
||||
|
||||
* One-click wizard accessible to system administrators.
|
||||
* Summary worksheet listing all users with counts of granted ACLs and record rules.
|
||||
* Summary worksheet listing each security group with user counts, ACL totals, and record rule totals.
|
||||
* Dedicated worksheet per user including:
|
||||
* Model access control list (CRUD) permissions derived from `ir.model.access`.
|
||||
* Record rule visibility and domain definitions from `ir.rule`.
|
||||
* Dedicated worksheet per security group including:
|
||||
* Group-specific ACL permissions.
|
||||
* Record rules that apply to the group.
|
||||
* Workbook generated entirely in-memory using `xlsxwriter`.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Copy the `user_access_rights_export` directory into your Odoo addons path.
|
||||
2. Update your addons list and install the module via Apps.
|
||||
3. Requires the Python package `xlsxwriter` (bundled with standard Odoo installations).
|
||||
|
||||
## Usage
|
||||
|
||||
1. Navigate to **Settings → Technical → User Access Rights Export**.
|
||||
2. Click **Generate**. The module will produce and download an `.xlsx` file.
|
||||
3. Open the Excel file to inspect summary metrics and per-user details.
|
||||
|
||||
## Security
|
||||
|
||||
Only members of the **Settings / Technical (System Administrator)** group can execute the export wizard.
|
||||
@ -1,2 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import wizard
|
||||
@ -1,34 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
"name": "User Access Rights Export",
|
||||
"version": "17.0.1.0.0",
|
||||
"category": "Settings/Technical",
|
||||
"summary": "Export detailed user access rights (model ACLs and record rules) to Excel",
|
||||
"description": """
|
||||
User Access Rights Export
|
||||
=========================
|
||||
|
||||
Generate an Excel workbook detailing the access rights of all internal users.
|
||||
|
||||
Features
|
||||
--------
|
||||
* Summary worksheet with key metrics per user.
|
||||
* Dedicated worksheet per user including:
|
||||
- Model access rights (CRUD permissions).
|
||||
- Record rules with domains and permissions.
|
||||
* XLSX output generated in-memory via xlsxwriter.
|
||||
""",
|
||||
"author": "Suherdy Yacob",
|
||||
"website": "https://www.example.com",
|
||||
"license": "LGPL-3",
|
||||
"depends": [
|
||||
"base",
|
||||
],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"views/user_access_rights_wizard_views.xml",
|
||||
],
|
||||
"installable": True,
|
||||
"application": False,
|
||||
"auto_install": False,
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
"name": "User Access Rights Export",
|
||||
"version": "17.0.1.0.0",
|
||||
"category": "Settings/Technical",
|
||||
"summary": "Export detailed user access rights (model ACLs and record rules) to Excel",
|
||||
"description": """
|
||||
User Access Rights Export
|
||||
=========================
|
||||
|
||||
Generate an Excel workbook detailing the access rights of all internal users.
|
||||
|
||||
Features
|
||||
--------
|
||||
* Summary worksheet with key metrics per user.
|
||||
* Dedicated worksheet per user including:
|
||||
- Model access rights (CRUD permissions).
|
||||
- Record rules with domains and permissions.
|
||||
* XLSX output generated in-memory via xlsxwriter.
|
||||
""",
|
||||
"author": "Suherdy Yacob",
|
||||
"website": "https://www.example.com",
|
||||
"license": "LGPL-3",
|
||||
"depends": [
|
||||
"base",
|
||||
],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"views/user_access_rights_wizard_views.xml",
|
||||
],
|
||||
"installable": True,
|
||||
"application": False,
|
||||
"auto_install": False,
|
||||
}
|
||||
BIN
__pycache__/__init__.cpython-310.pyc
Normal file
BIN
__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_user_access_rights_wizard,user.access.rights.wizard,model_user_access_rights_wizard,base.group_system,1,1,1,1
|
||||
|
@ -1,46 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_user_access_rights_wizard_form" model="ir.ui.view">
|
||||
<field name="name">user.access.rights.wizard.form</field>
|
||||
<field name="model">user.access.rights.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Export User Access Rights">
|
||||
<sheet>
|
||||
<group col="1" class="o_form_full_width">
|
||||
<separator string="Overview" colspan="1"/>
|
||||
<div class="o_form_description">
|
||||
<p><strong>Generate a consolidated Excel workbook of user access rights.</strong></p>
|
||||
<ul class="o_form_list">
|
||||
<li>Includes model ACL permissions (Read, Write, Create, Delete) per user.</li>
|
||||
<li>Captures applicable record rules and their domains.</li>
|
||||
<li>Download starts automatically once the report is ready.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</group>
|
||||
<group col="2" modifiers="{'invisible': [('excel_file', '=', False)]}">
|
||||
<field name="filename" readonly="1" string="Generated File"/>
|
||||
<field name="excel_file" filename="filename" invisible="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button string="Generate" type="object" name="action_generate_report" class="btn-primary"/>
|
||||
<button string="Close" special="cancel" class="btn-secondary"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_user_access_rights_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Export User Access Rights</field>
|
||||
<field name="res_model">user.access.rights.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_user_access_rights_export_root"
|
||||
name="User Access Rights Export"
|
||||
parent="base.menu_custom"
|
||||
sequence="50"
|
||||
action="action_user_access_rights_wizard"
|
||||
groups="base.group_system"/>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_user_access_rights_wizard_form" model="ir.ui.view">
|
||||
<field name="name">user.access.rights.wizard.form</field>
|
||||
<field name="model">user.access.rights.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Export User Access Rights">
|
||||
<sheet>
|
||||
<group col="1" class="o_form_full_width">
|
||||
<separator string="Overview" colspan="1"/>
|
||||
<div class="o_form_description">
|
||||
<p><strong>Generate a consolidated Excel workbook of user access rights.</strong></p>
|
||||
<ul class="o_form_list">
|
||||
<li>Includes model ACL permissions (Read, Write, Create, Delete) per user.</li>
|
||||
<li>Captures applicable record rules and their domains.</li>
|
||||
<li>Download starts automatically once the report is ready.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</group>
|
||||
<group col="2" modifiers="{'invisible': [('excel_file', '=', False)]}">
|
||||
<field name="filename" readonly="1" string="Generated File"/>
|
||||
<field name="excel_file" filename="filename" invisible="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button string="Generate" type="object" name="action_generate_report" class="btn-primary"/>
|
||||
<button string="Close" special="cancel" class="btn-secondary"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_user_access_rights_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Export User Access Rights</field>
|
||||
<field name="res_model">user.access.rights.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_user_access_rights_export_root"
|
||||
name="User Access Rights Export"
|
||||
parent="base.menu_custom"
|
||||
sequence="50"
|
||||
action="action_user_access_rights_wizard"
|
||||
groups="base.group_system"/>
|
||||
</odoo>
|
||||
@ -1,2 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import user_access_rights_wizard
|
||||
BIN
wizard/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
wizard/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
wizard/__pycache__/user_access_rights_wizard.cpython-310.pyc
Normal file
BIN
wizard/__pycache__/user_access_rights_wizard.cpython-310.pyc
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user