Enforce Bouncer authorization checks across resource controllers#2467
Open
bhavesh-018 wants to merge 8 commits intokrayin:2.1from
Open
Enforce Bouncer authorization checks across resource controllers#2467bhavesh-018 wants to merge 8 commits intokrayin:2.1from
bhavesh-018 wants to merge 8 commits intokrayin:2.1from
Conversation
added 8 commits
March 10, 2026 13:03
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.
Issue Reference
Fix #2462
Description
This PR fixes an authorization bypass vulnerability where certain controllers retrieved resources directly using findOrFail($id) without verifying that the current user is authorized to access them.
Although DataGrid queries correctly scoped records using:
bouncer()->getAuthorizedUserIds()direct endpoints such as view, edit, update, destroy, print, and download could bypass these restrictions through direct URL access.
How To Test This?
1. Create Users
Create two users in the admin panel.
Example:
Ensure that the selected role has permissions configured for Leads, Persons, Quotes, and Activities.
2. Configure Role Permissions
Navigate to:
Settings → Roles → <Your Role>Set the permissions for the following resources to:
IndividualSelect:
This ensures that users can only access resources owned by themselves.
3. Create Test Resources
Create resources owned by different users.
Example:
Similarly create:
assigned to different users.
4. Login as User A
Login as User A.
Verify that the list pages only show resources owned by User A.
Documentation
Branch Selection
Tailwind Reordering
No Tailwind classes were modified.