-
Notifications
You must be signed in to change notification settings - Fork 12k
feat: PBAC on team members page + org members page to use specific permissi… #23004
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
131fe52
PBAC on team members page + org members page to use specific permissi…
sean-brydon b52f355
Implement checks on edit sheet fetch to check for permisisons
sean-brydon 8ead04b
WIP permission fixes
sean-brydon 447ce58
fix tests
sean-brydon f4413b4
WIP
sean-brydon 36de220
fix edit mode perms
sean-brydon da52e6e
fix remove and list view permissions
sean-brydon cf92565
fix add
sean-brydon 868e104
Merge branch 'main' into feat/pbac-team-members
sean-brydon 1c43f49
feat: add pbac permissions for impersonation (#23035)
sean-brydon 31ec854
Merge branch 'main' into feat/pbac-team-members
volnei 9327a30
Merge branch 'main' into feat/pbac-team-members
eunjae-lee cb1bd94
add missing prisma import
eunjae-lee 51802af
add resend invitation and edit mode checks for delete/changeRole
sean-brydon 983bfe6
fix canChangeRole
sean-brydon 3bd186d
Merge branch 'main' into feat/pbac-team-members
sean-brydon adc31bd
Merge branch 'main' into feat/pbac-team-members
sean-brydon 789ff27
canChangeRole gate
sean-brydon cf6f0cd
fix permission logic
sean-brydon c357aa4
fix depends on
sean-brydon 7c7df00
push migration
sean-brydon 9ba7f2b
fix migration
sean-brydon 94b2a33
Merge branch 'main' into feat/pbac-team-members
sean-brydon 9381049
fix scoped advanced permissions
sean-brydon 2fff396
use listMembers instead of invite proxy
sean-brydon eb60fb8
remove isOrgAdmin check to rely on pbac
sean-brydon f829002
wait for session to load before navigating
sean-brydon f701ceb
use event-types testId to ensure session loaded
sean-brydon e57e998
Merge branch 'main' into fix/api-login-diff-session
sean-brydon a327df0
use profile page instead of eventTypes
sean-brydon e4d4fe7
Merge remote-tracking branch 'refs/remotes/origin/fix/api-login-diff-…
sean-brydon 4976ce5
Merge branch 'fix/api-login-diff-session' into feat/pbac-team-members
sean-brydon 84dd982
Merge branch 'main' into feat/pbac-team-members
sean-brydon fdaa107
use correct roles
sean-brydon 1bea772
fix wait for session
sean-brydon c16462d
correct orgs private isFallBackRoles
sean-brydon dcce84b
set a timeout on waiting for session
sean-brydon 8e3ef83
remove adminOrOwner check since its in fallpack
sean-brydon 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
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
Oops, something went wrong.
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.
💡 Verification agent
🧩 Analysis chain
Ensure getResourcePermissionLevel is scope-aware.
This component calls
usePermissions(scope), but the hook’sgetResourcePermissionLevelcurrently reads from the global registry (see usePermissions.ts). Fix there to avoid mismatched “all/read” states when actions are out of scope.🏁 Script executed:
Length of output: 1272
🏁 Script executed:
Length of output: 170
🏁 Script executed:
Length of output: 2816
🏁 Script executed:
Length of output: 6800
Make getResourcePermissionLevel scope-aware in usePermissions.ts
In apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/roles/_components/usePermissions.ts, update getResourcePermissionLevel to pull its resourceConfig from getPermissionsForScope(scope) instead of the global PERMISSION_REGISTRY so it only considers actions valid for the given scope.
🤖 Prompt for AI Agents