TJK: custom roles adjustments#14
Open
MatiasArriola wants to merge 2 commits into
Open
Conversation
Allow Facility Storekeeper and Regional Warehouse User to use stock request workflows in a way that matches the documented permissions matrix. Also fix the legacy inventory browser adjust-stock action to use the real adjustment route and add focused policy regression coverage.
Allow Facility Storekeeper and Regional Warehouse to complete the record stock flow end to end, including the shared link authorization path used by legacy GSP actions. Also hide product edit and stocklist actions according to the custom permissions matrix and add focused regression coverage for the adjusted policy behavior.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✨ Description of Change
Link to GitHub issue or Jira ticket: https://app.clickup.com/t/869da29v7
Description:
This PR aligns legacy inventory/product actions with the custom role permissions matrix.
It fixes two related issues:
Access deniedalert from legacyg:linkauthorizationChanges
inventoryItem.showRecordInventoryinventoryItem.saveRecordInventoryrecordStockApi.saveRecordStockstockMovement.createRequestg:linkauthorization to honor custom role policy before applying legacy manager/admin/superuser link disablingEdit productfor roles without product management accessManage stock listsfor roles without stocklist management accessWhy
The custom permissions matrix is enforced in
CustomRolePolicyService, but several legacy GSPs were still using older role assumptions in the UI.That created two bad outcomes:
Record stockwere technically allowed but blocked in the browser before navigationEdit productwere visible even though the matrix says they should not be accessibleThis PR makes the visible actions and actual route authorization consistent.
Expected behavior after this change
Facility Storekeeper
Record stockEdit productManage stock listsRegional Warehouse
Record stockEdit productManage stock listsAssumed "Record stock" is allowed because it is an inventory write action, like adjust stock.