-
Notifications
You must be signed in to change notification settings - Fork 3
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
Draft
emjay0921
wants to merge
13
commits into
19.0
Choose a base branch
from
fix/951-role-menu-audit-additive
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
82d62ae
fix(roles): align user-role group memberships with OP#951 menu audit …
emjay0921 f8b920e
fix(roles): load user_roles.xml after security/groups.xml (OP#951 PR-A)
emjay0921 100ba93
chore(roles): regenerate READMEs to match CI docutils output (OP#951 …
emjay0921 b4f39f7
fix(roles): gate Hazard/GIS Reports/GRM menu roots + Cycle Approver T…
emjay0921 92a5405
chore(roles): regenerate READMEs to match CI docutils output (OP#951 …
emjay0921 606c83d
fix(spp_studio): drop Program Manager → group_studio_viewer per OP#95…
emjay0921 7624e13
chore(spp_studio): regenerate README to match CI docutils output (OP#…
emjay0921 e70a983
fix(spp_security): gate Apps menu on base.group_system per OP#951 audit
emjay0921 8ce0cd4
chore(spp_security): regenerate README to match CI docutils output (O…
emjay0921 cc11557
fix(spp_security): gate Apps menu via post_init_hook, not XML record …
emjay0921 c9bb0f0
fix(spp_base_common): gate Apps menu on base.group_system via existin…
emjay0921 779171e
chore: regenerate spp_base_common + spp_security READMEs (OP#951)
emjay0921 92b422a
fix(roles): OP#951 round-2 - tighten ACLs and gate management buttons
emjay0921 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ### 19.0.2.0.1 | ||
|
|
||
| - fix(security): add `groups="base.group_system"` to the existing `<menuitem id="base.menu_management" />` override in `views/main_view.xml`. Out of the box the Apps top-level menu has no group restriction and is visible to every logged-in user, violating the OP#951 audit's `Apps: no` rows. The override here is the single authoritative declaration for this menu's attributes in the OpenSPP install (sequence, custom OpenSPP icon, and now group_ids); doing the gating anywhere upstream (e.g. a `post_init_hook` in `spp_security`) is unreliable because this `<menuitem>` reload re-writes the record without a `groups` attribute and resets `group_ids` to empty. | ||
|
|
||
| ### 19.0.2.0.0 | ||
|
|
||
| - Initial migration to OpenSPP2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.