forked from baron/baron-sso
devfront rp_admin tenant_admin 제거
This commit is contained in:
@@ -150,7 +150,7 @@ export function makeClient(
|
||||
|
||||
export async function seedAuth(page: Page, role?: string) {
|
||||
const nowInSeconds = Math.floor(Date.now() / 1000);
|
||||
seededRoles.set(page, role || "rp_admin");
|
||||
seededRoles.set(page, role || "super_admin");
|
||||
|
||||
await page.addInitScript(
|
||||
({ issuedAt, injectedRole }) => {
|
||||
@@ -190,7 +190,7 @@ export async function seedAuth(page: Page, role?: string) {
|
||||
window.sessionStorage.setItem(key, JSON.stringify(mockOidcUser));
|
||||
}
|
||||
|
||||
window.localStorage.setItem("dev_role", injectedRole || "rp_admin");
|
||||
window.localStorage.setItem("dev_role", injectedRole || "super_admin");
|
||||
window.localStorage.setItem("dev_tenant_id", "tenant-a");
|
||||
},
|
||||
{ issuedAt: nowInSeconds, injectedRole: role ?? "" },
|
||||
@@ -240,7 +240,7 @@ function parseClientId(pathname: string): string {
|
||||
|
||||
export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
const readMockRole = () =>
|
||||
(state.mockRole ?? seededRoles.get(page) ?? "rp_admin").trim();
|
||||
(state.mockRole ?? seededRoles.get(page) ?? "super_admin").trim();
|
||||
|
||||
const buildSelfConfigEditorRelation = (): ClientRelation => ({
|
||||
relation: "config_editor",
|
||||
@@ -253,7 +253,7 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
});
|
||||
|
||||
const shouldGrantDefaultEditRelation = (role: string) =>
|
||||
role === "rp_admin" || role === "tenant_admin" || role === "super_admin";
|
||||
role === "super_admin";
|
||||
|
||||
const resolveClientRelations = async (clientId: string) => {
|
||||
const explicitRelations = state.relations?.[clientId];
|
||||
|
||||
Reference in New Issue
Block a user