-
Notifications
You must be signed in to change notification settings - Fork 6
fix(roles): complete OP#951 menu audit — role group updates + menu gating #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
82d62ae
f8b920e
100ba93
b4f39f7
92a5405
606c83d
7624e13
e70a983
8ce0cd4
cc11557
c9bb0f0
779171e
92b422a
441023c
cf66199
b52b805
e6db9de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <!-- | ||
| Part of OpenSPP. See LICENSE file for full copyright and licensing details. | ||
|
|
||
| Role extensions: grant `group_area_viewer` (read-only) to spp_user_roles support | ||
| roles whose audited menu visibility should include "Area" (OP#951). | ||
|
|
||
| System Admin sees the menu via `spp_security.group_spp_admin` → `group_area_manager`. | ||
| --> | ||
| <odoo noupdate="1"> | ||
| <record id="spp_user_roles.global_role_support" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_area_viewer'))]" /> | ||
| </record> | ||
| <record id="spp_user_roles.global_role_support_manager" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_area_viewer'))]" /> | ||
| </record> | ||
| <record id="spp_user_roles.local_role_support" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_area_viewer'))]" /> | ||
| </record> | ||
| </odoo> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ### 19.0.2.0.1 | ||
|
|
||
| - fix(security): grant `group_area_viewer` (read-only) to spp_user_roles support roles (Global Support, Global Support Manager, Local Support) so they can browse area records per the OP#951 menu audit. | ||
|
|
||
| ### 19.0.2.0.0 | ||
|
|
||
| - Initial migration to OpenSPP2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ### 19.0.2.0.1 | ||
|
|
||
| - fix(security): align Farm User / Farm Manager roles with the OP#951 menu audit — both farm roles now imply `spp_hazard.group_hazard_viewer` and `spp_gis_report.group_gis_report_user` so they retain Hazard and GIS Reports menu visibility once those menu roots are gated. Adds `spp_hazard` and `spp_gis_report` to module dependencies. | ||
|
|
||
| ### 19.0.2.0.0 | ||
|
|
||
| - Initial migration to OpenSPP2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "OpenSPP GIS Reports", | ||
| "version": "19.0.2.0.0", | ||
| "version": "19.0.2.0.1", | ||
| "category": "OpenSPP", | ||
| "summary": "Geographic visualization and reporting for social protection data", | ||
| "author": "OpenSPP.org, OpenSPP", | ||
|
|
@@ -26,6 +26,7 @@ | |
| "security/ir.model.access.csv", | ||
| # Data | ||
| "data/gis_report_category_data.xml", | ||
| "data/user_roles.xml", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "data/templates/coverage_templates.xml", | ||
| "data/templates/disaster_templates.xml", | ||
| "data/templates/demographic_templates.xml", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <!-- | ||
| Part of OpenSPP. See LICENSE file for full copyright and licensing details. | ||
|
|
||
| Role extensions: grant `group_gis_report_user` (read tier) to spp_user_roles | ||
| roles whose audited menu visibility should include "GIS Reports" (OP#951). | ||
|
|
||
| System Admin sees the menu via `spp_security.group_spp_admin` → `group_gis_report_manager` | ||
| (wired in `spp_gis_report/security/groups.xml`). | ||
|
|
||
| Roles defined in spp_programs / spp_farmer_registry have their gis_report_user | ||
| extensions in those modules' own user_roles.xml. | ||
| --> | ||
| <odoo noupdate="1"> | ||
| <record id="spp_user_roles.global_role_program_manager" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_gis_report_user'))]" /> | ||
| </record> | ||
| </odoo> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ### 19.0.2.0.1 | ||
|
|
||
| - fix(security): grant `group_gis_report_user` to spp_user_roles' Global Program Manager role so the OP#951 menu audit expectation (Program Manager sees GIS Reports) is preserved once the GIS Reports menu root is gated. | ||
|
|
||
| ### 19.0.2.0.0 | ||
|
|
||
| - Initial migration to OpenSPP2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| "for emergency response. Links registrants to disaster events with geographic scope " | ||
| "and severity tracking to enable targeted humanitarian assistance.", | ||
| "category": "OpenSPP/Targeting", | ||
| "version": "19.0.2.0.0", | ||
| "version": "19.0.2.0.1", | ||
| "sequence": 1, | ||
| "author": "OpenSPP.org", | ||
| "website": "https://github.com/OpenSPP/OpenSPP2", | ||
|
|
@@ -27,6 +27,7 @@ | |
| "security/groups.xml", | ||
| "security/ir.model.access.csv", | ||
| "data/impact_type_data.xml", | ||
| "data/user_roles.xml", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The newly added |
||
| "views/hazard_category_views.xml", | ||
| "views/hazard_incident_views.xml", | ||
| "views/hazard_impact_views.xml", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <!-- | ||
| Part of OpenSPP. See LICENSE file for full copyright and licensing details. | ||
|
|
||
| Role extensions: grant `group_hazard_viewer` to spp_user_roles roles whose | ||
| audited menu visibility should include "Hazard and Emergency" (OP#951). | ||
|
|
||
| Roles that should NOT see Hazard per the audit (Global Finance, Global Support, | ||
| Global Support Manager, Local Support) are intentionally omitted. | ||
|
|
||
| System Admin sees the menu via `spp_security.group_spp_admin` → `group_hazard_manager` | ||
| (wired in `spp_hazard/security/groups.xml`), so no extension is needed for that role. | ||
|
|
||
| Roles defined in spp_programs / spp_change_request_v2 / spp_farmer_registry have | ||
| their hazard-viewer extensions in those modules' own user_roles.xml (this module | ||
| does not depend on them). | ||
| --> | ||
| <odoo noupdate="1"> | ||
| <record id="spp_user_roles.global_role_registry_viewer" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_hazard_viewer'))]" /> | ||
| </record> | ||
| <record id="spp_user_roles.global_role_program_manager" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_hazard_viewer'))]" /> | ||
| </record> | ||
| <record id="spp_user_roles.global_role_registrar" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_hazard_viewer'))]" /> | ||
| </record> | ||
| <record id="spp_user_roles.local_role_registrar" model="res.users.role"> | ||
| <field name="implied_ids" eval="[Command.link(ref('group_hazard_viewer'))]" /> | ||
| </record> | ||
| </odoo> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ### 19.0.2.0.1 | ||
|
|
||
| - fix(security): grant `group_hazard_viewer` to spp_user_roles roles (Registry Viewer, Program Manager, Global/Local Registrar) that the OP#951 menu audit identifies as needing read-only Hazard menu access. Other affected roles defined outside this module (program/CR/farm roles) are wired in their own modules. | ||
|
|
||
| ### 19.0.2.0.0 | ||
|
|
||
| - Initial migration to OpenSPP2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modifications to these role records are inside a block. Since this file is already part of the module's data, these changes will not be applied to existing databases during a standard upgrade. A migration script or a call is required to ensure existing roles are updated to align with the menu audit.