feat: PBAC on team members page + org members page to use specific permissi… (#23004)

* PBAC on team members page + org members page to use specific permissions with fallbacks

* Implement checks on edit sheet fetch to check for permisisons

* WIP permission fixes

* fix tests

* WIP

* fix edit mode perms

* fix remove and list view permissions

* fix add

* feat: add pbac permissions for impersonation (#23035)

* registery + migration + i18n

* UI for can impersonate

* impersonation backend

* remove permission from db query

* add missing prisma import

* add resend invitation and edit mode checks for delete/changeRole

* fix canChangeRole

* canChangeRole gate

* fix permission logic

* fix depends on

* push migration

* fix migration

* fix scoped advanced permissions

* use listMembers instead of invite proxy

* remove isOrgAdmin check to rely on pbac

* wait for session to load before navigating

* use event-types testId to ensure session loaded

* use profile page instead of eventTypes

* use correct roles

* fix wait for session

* correct orgs private isFallBackRoles

* set a timeout on waiting for session

* remove adminOrOwner check since its in fallpack

---------

Co-authored-by: Volnei Munhoz <[email protected]>
Co-authored-by: Eunjae Lee <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-09-02 12:52:45 -03:00
1 parent 2dbd0b3832
commit 75465ac4bf
28 files changed
+830 -214

No files matched your search

+7 -2
View File
@@ -1004,8 +1004,13 @@ export async function apiLogin(
*/
await page.goto(navigateToUrl || "/settings/my-account/profile");
// Wait for the session to be fully established
await page.waitForLoadState();
// Wait for the session API call to complete to ensure session is fully established
// Only wait if we're on a protected page that would trigger the session API call
try {
await page.waitForResponse("/api/auth/session", { timeout: 2000 });
} catch (error) {
// Session API call not made (likely on a public page), continue anyway
}
return response;
}