1
0
forked from baron/baron-sso

custom claim 권한체크 확인

This commit is contained in:
2026-06-11 08:29:25 +09:00
parent 839ca9d407
commit 4d77060b5d
79 changed files with 4268 additions and 670 deletions

View File

@@ -182,6 +182,52 @@ async function waitForTextContent(container: HTMLElement, text: string) {
}
describe("ClientsPage", () => {
it("does not show the legacy tenant scope label for unrestricted clients", async () => {
fetchClientsMock.mockResolvedValue({
items: [
{
...makeClients(1)[0],
name: "Unrestricted App",
metadata: {
tenant_access_restricted: false,
allowed_tenants: [],
},
},
],
limit: 100,
offset: 0,
});
const container = await renderPage();
expect(container.textContent).toContain("Unrestricted App");
expect(container.textContent).not.toContain("Tenant-scoped");
expect(container.textContent).not.toContain("Tenant-limited");
});
it("shows Tenant-limited only when client tenant access is restricted", async () => {
fetchClientsMock.mockResolvedValue({
items: [
{
...makeClients(1)[0],
name: "Limited App",
metadata: {
tenant_access_restricted: true,
allowed_tenants: ["tenant-1"],
},
},
],
limit: 100,
offset: 0,
});
const container = await renderPage();
expect(container.textContent).toContain("Limited App");
expect(container.textContent).toContain("Tenant-limited");
expect(container.textContent).not.toContain("Tenant-scoped");
});
it("expands the list and applies search filters", async () => {
fetchClientsMock.mockResolvedValue({
items: makeClients(6),