fix(frontend): show database management entry to local users
This commit is contained in:
@@ -121,7 +121,7 @@ test("keeps a live core session connected and returns when that session is opene
|
|||||||
expect(FakeEventSource.instances).toHaveLength(1);
|
expect(FakeEventSource.instances).toHaveLength(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("hides database management from users without workspace management permission", () => {
|
test("shows database management entry to authenticated users without workspace management permission", () => {
|
||||||
clearAuthState();
|
clearAuthState();
|
||||||
setAuthState({
|
setAuthState({
|
||||||
issuer: "test",
|
issuer: "test",
|
||||||
@@ -135,5 +135,5 @@ test("hides database management from users without workspace management permissi
|
|||||||
|
|
||||||
renderShell();
|
renderShell();
|
||||||
|
|
||||||
expect(screen.queryByRole("button", { name: "Database management" })).not.toBeInTheDocument();
|
expect(screen.getByRole("button", { name: "Database management" })).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -745,7 +745,6 @@ export function AppShell({ canLogout }: AppShellProps) {
|
|||||||
>
|
>
|
||||||
Workspace management
|
Workspace management
|
||||||
</Button>
|
</Button>
|
||||||
{canManageWorkspace && (
|
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -760,7 +759,6 @@ export function AppShell({ canLogout }: AppShellProps) {
|
|||||||
>
|
>
|
||||||
Database management
|
Database management
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
|
||||||
{canManagePi && (
|
{canManagePi && (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
|||||||
Reference in New Issue
Block a user