Skip to content

FOUR-31148: Fix group permission authorization#8827

Open
eiresendez wants to merge 3 commits into
developfrom
bugfix/FOUR-31148
Open

FOUR-31148: Fix group permission authorization#8827
eiresendez wants to merge 3 commits into
developfrom
bugfix/FOUR-31148

Conversation

@eiresendez
Copy link
Copy Markdown
Contributor

@eiresendez eiresendez commented May 14, 2026

Issue & Reproduction Steps

A user without direct permissions but with inherited group permissions for viewing, creating, editing, and deleting groups can open Admin > Groups > Edit Group > Group Permissions. When that user attempts to assign all permissions to a group and save, the UI shows "This action is unauthorized" because PUT /api/1.0/permissions returns 403.

Solution

  • Move permission update authorization from the route middleware into PermissionController::update so it checks the requested target entity.
  • Require edit-users when updating user permissions and edit-groups when updating group permissions.
  • Validate that permission update requests include exactly one target, either user_id or group_id.
  • Add feature coverage for inherited group permission saves, denied user permission saves, denied group permission saves, and invalid target payloads.

How to Test

  • vendor/bin/phpunit tests/Feature/Api/PermissionsTest.php
  • Manual check: log in as a non-admin user with inherited edit-groups but no edit-users, open Admin > Groups > Edit Group > Group Permissions, assign permissions, and save successfully.

Related Tickets & Packages

ci:deploy

.

@eiresendez eiresendez force-pushed the bugfix/FOUR-31148 branch from 58f4017 to bd026ef Compare May 14, 2026 19:33
@eiresendez eiresendez force-pushed the bugfix/FOUR-31148 branch from bd026ef to 03bd513 Compare May 14, 2026 19:43
@eiresendez eiresendez self-assigned this May 18, 2026
@eiresendez eiresendez requested a review from CarliPinell May 18, 2026 15:40
@eiresendez
Copy link
Copy Markdown
Contributor Author

Hi @CarliPinell when you have a chance, could you please take a look at this PR?

It’s not a high priority ticket — just part of the Maniac Monday issues, so no rush.
Thanks!

cc: @sanjacornelius

@processmaker-sonarqube
Copy link
Copy Markdown

@Kookster310
Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-9756d86e2f.engk8s.processmaker.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants