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

@@ -59,6 +59,19 @@ import { ClientLogo } from "./components/ClientLogo";
type ClientSortKey = "application" | "id" | "type" | "status" | "createdAt";
const clientListPreviewCount = 5;
function isClientTenantLimited(client: ClientSummary) {
const metadata = client.metadata ?? {};
if (metadata.tenant_access_restricted === true) {
return true;
}
if (!Array.isArray(metadata.allowed_tenants)) {
return false;
}
return metadata.allowed_tenants.some(
(tenantId) => typeof tenantId === "string" && tenantId.trim() !== "",
);
}
function ClientsPage() {
const navigate = useNavigate();
const auth = useAuth();
@@ -529,14 +542,16 @@ function ClientsPage() {
{client.name ||
t("ui.dev.clients.untitled", "Untitled")}
</p>
<p className="text-xs text-muted-foreground">
<span aria-hidden="true">
{t(
"ui.dev.clients.tenant_scoped",
"Tenant-scoped",
)}
</span>
</p>
{isClientTenantLimited(client) && (
<p className="text-xs text-muted-foreground">
<span aria-hidden="true">
{t(
"ui.dev.clients.tenant_limited",
"Tenant-limited",
)}
</span>
</p>
)}
</div>
</Link>
</TableCell>