Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
82d62ae
fix(roles): align user-role group memberships with OP#951 menu audit …
emjay0921 May 11, 2026
f8b920e
fix(roles): load user_roles.xml after security/groups.xml (OP#951 PR-A)
emjay0921 May 11, 2026
100ba93
chore(roles): regenerate READMEs to match CI docutils output (OP#951 …
emjay0921 May 11, 2026
b4f39f7
fix(roles): gate Hazard/GIS Reports/GRM menu roots + Cycle Approver T…
emjay0921 May 11, 2026
92a5405
chore(roles): regenerate READMEs to match CI docutils output (OP#951 …
emjay0921 May 11, 2026
606c83d
fix(spp_studio): drop Program Manager → group_studio_viewer per OP#95…
emjay0921 May 11, 2026
7624e13
chore(spp_studio): regenerate README to match CI docutils output (OP#…
emjay0921 May 11, 2026
e70a983
fix(spp_security): gate Apps menu on base.group_system per OP#951 audit
emjay0921 May 12, 2026
8ce0cd4
chore(spp_security): regenerate README to match CI docutils output (O…
emjay0921 May 12, 2026
cc11557
fix(spp_security): gate Apps menu via post_init_hook, not XML record …
emjay0921 May 12, 2026
c9bb0f0
fix(spp_base_common): gate Apps menu on base.group_system via existin…
emjay0921 May 12, 2026
779171e
chore: regenerate spp_base_common + spp_security READMEs (OP#951)
emjay0921 May 12, 2026
92b422a
fix(roles): OP#951 round-2 - tighten ACLs and gate management buttons
emjay0921 May 14, 2026
441023c
Merge branch '19.0' into fix/951-role-menu-audit-additive
emjay0921 May 14, 2026
cf66199
chore: regenerate READMEs after HISTORY merges (#951)
emjay0921 May 14, 2026
b52b805
merge: resolve conflicts with 19.0 — bump spp_area to .0.2, spp_chang…
emjay0921 May 19, 2026
e6db9de
merge: re-resolve spp_change_request_v2 conflict after PR 202 landed …
emjay0921 May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spp_area/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OpenSPP Area Management",
"summary": "Establishes direct associations between OpenSPP registrants, beneficiary groups, and their corresponding geographical administrative areas. It validates registrant-area linkages against official area types, ensuring data integrity and enabling targeted program delivery and analysis.",
"category": "OpenSPP/Core",
"version": "19.0.2.0.0",
"version": "19.0.2.0.1",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
Expand All @@ -30,6 +30,7 @@
"data/area_type_data.xml",
"data/area_tag_data.xml",
"data/queue_limit_data.xml",
"data/user_roles.xml",
"security/privileges.xml",
"security/groups.xml",
"security/ir.model.access.csv",
Expand Down
20 changes: 20 additions & 0 deletions spp_area/data/user_roles.xml
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>
4 changes: 4 additions & 0 deletions spp_area/readme/HISTORY.md
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
3 changes: 2 additions & 1 deletion spp_change_request_v2/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OpenSPP Change Request V2",
"version": "19.0.2.0.3",
"version": "19.0.2.0.4",
"sequence": 50,
"category": "OpenSPP",
"summary": "Configuration-driven change request system with UX improvements, conflict detection and duplicate prevention",
Expand All @@ -16,6 +16,7 @@
"spp_security",
"spp_approval",
"spp_event_data",
"spp_hazard",
"spp_dms",
"spp_vocabulary",
],
Expand Down
9 changes: 6 additions & 3 deletions spp_change_request_v2/data/user_roles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ User roles for Change Request module.
eval="[
Command.link(ref('base.group_user')),
Command.link(ref('group_cr_manager')),
Command.link(ref('spp_registry.group_registry_read')),
Command.link(ref('spp_registry.group_registry_viewer')),
Command.link(ref('spp_hazard.group_hazard_viewer')),
Comment on lines +21 to +22

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

]"
/>
</record>
Expand All @@ -34,7 +35,8 @@ User roles for Change Request module.
eval="[
Command.link(ref('base.group_user')),
Command.link(ref('group_cr_validator')),
Command.link(ref('spp_registry.group_registry_read')),
Command.link(ref('spp_registry.group_registry_viewer')),
Command.link(ref('spp_hazard.group_hazard_viewer')),
]"
/>
</record>
Expand All @@ -50,7 +52,8 @@ User roles for Change Request module.
eval="[
Command.link(ref('base.group_user')),
Command.link(ref('group_cr_validator_hq')),
Command.link(ref('spp_registry.group_registry_read')),
Command.link(ref('spp_registry.group_registry_viewer')),
Command.link(ref('spp_hazard.group_hazard_viewer')),
]"
/>
</record>
Expand Down
4 changes: 4 additions & 0 deletions spp_change_request_v2/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 19.0.2.0.4

- fix(security): align CR Requestor / CR Local Validator / CR HQ Validator roles with the OP#951 menu audit — replace the `spp_registry.group_registry_read` (Tier-3, no menu) link with `spp_registry.group_registry_viewer` so these roles see the Registry menu; add `spp_hazard.group_hazard_viewer` so they retain Hazard visibility once the menu root is gated. Adds `spp_hazard` to module dependencies.

### 19.0.2.0.3

- fix: add HTML escaping to all computed Html fields with `sanitize=False` to prevent stored XSS (#50)
Expand Down
5 changes: 4 additions & 1 deletion spp_farmer_registry/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "OpenSPP Farmer Registry",
"summary": "Farmer Registry with vocabulary-based fields, CEL variables, and Logic Studio integration",
"category": "OpenSPP",
"version": "19.0.2.0.0",
"version": "19.0.2.0.1",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
Expand All @@ -26,6 +26,9 @@
"spp_land_record",
"spp_irrigation",
"spp_gis",
# OP#951 menu audit — roles get hazard / GIS reports menu access
"spp_hazard",
"spp_gis_report",
],
"excludes": [
"spp_base_farmer_registry", # V1 module - incompatible _inherits definitions
Expand Down
4 changes: 4 additions & 0 deletions spp_farmer_registry/data/user_roles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
Command.link(ref('base.group_user')),
Command.link(ref('group_spp_farm_user')),
Command.link(ref('spp_registry.group_registry_officer')),
Command.link(ref('spp_hazard.group_hazard_viewer')),
Command.link(ref('spp_gis_report.group_gis_report_user')),
]"
/>
</record>
Expand All @@ -35,6 +37,8 @@
Command.link(ref('group_spp_farm_manager')),
Command.link(ref('spp_irrigation.group_irrigation_manager')),
Command.link(ref('spp_registry.group_registry_manager')),
Command.link(ref('spp_hazard.group_hazard_viewer')),
Command.link(ref('spp_gis_report.group_gis_report_user')),
]"
/>
</record>
Expand Down
4 changes: 4 additions & 0 deletions spp_farmer_registry/readme/HISTORY.md
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
3 changes: 2 additions & 1 deletion spp_gis_report/__manifest__.py
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",
Expand All @@ -26,6 +26,7 @@
"security/ir.model.access.csv",
# Data
"data/gis_report_category_data.xml",
"data/user_roles.xml",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The newly added data/user_roles.xml references external IDs from the spp_user_roles module, but spp_user_roles is not listed as a dependency in the manifest. Please add it to the depends list to ensure correct loading order.

"data/templates/coverage_templates.xml",
"data/templates/disaster_templates.xml",
"data/templates/demographic_templates.xml",
Expand Down
18 changes: 18 additions & 0 deletions spp_gis_report/data/user_roles.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>
4 changes: 4 additions & 0 deletions spp_gis_report/readme/HISTORY.md
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
3 changes: 2 additions & 1 deletion spp_hazard/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -27,6 +27,7 @@
"security/groups.xml",
"security/ir.model.access.csv",
"data/impact_type_data.xml",
"data/user_roles.xml",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The newly added data/user_roles.xml references external IDs from the spp_user_roles module (e.g., spp_user_roles.global_role_registry_viewer), but spp_user_roles is not listed as a dependency in the manifest. While it may be transitively included via other modules, it is best practice to explicitly declare dependencies on any module whose data you reference to ensure correct loading order and prevent future breakages.

"views/hazard_category_views.xml",
"views/hazard_incident_views.xml",
"views/hazard_impact_views.xml",
Expand Down
31 changes: 31 additions & 0 deletions spp_hazard/data/user_roles.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>
4 changes: 4 additions & 0 deletions spp_hazard/readme/HISTORY.md
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
Loading
Loading