From 93df9b98d3d47b3126f140e5760c03c92505c564 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Fri, 5 Aug 2022 11:16:10 +0200 Subject: [PATCH] Changed the access to the page to query (#3047) --- src/clients/routes/Client.ts | 2 +- src/clients/scopes/ClientScopes.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/clients/routes/Client.ts b/src/clients/routes/Client.ts index 581cbe6f91..070fc6337d 100644 --- a/src/clients/routes/Client.ts +++ b/src/clients/routes/Client.ts @@ -26,7 +26,7 @@ export const ClientRoute: RouteDef = { path: "/:realm/clients/:clientId/:tab", component: lazy(() => import("../ClientDetails")), breadcrumb: (t) => t("clients:clientSettings"), - access: "view-clients", + access: "query-clients", }; export const toClient = (params: ClientParams): LocationDescriptorObject => ({ diff --git a/src/clients/scopes/ClientScopes.tsx b/src/clients/scopes/ClientScopes.tsx index 08576ba535..93aa4ceae3 100644 --- a/src/clients/scopes/ClientScopes.tsx +++ b/src/clients/scopes/ClientScopes.tsx @@ -96,14 +96,14 @@ export const ClientScopes = ({ const clientScopes = await adminClient.clientScopes.find(); const find = (id: string) => - clientScopes.find((clientScope) => id === clientScope.id)!; + clientScopes.find((clientScope) => id === clientScope.id); const optional = optionalClientScopes.map((c) => { const scope = find(c.id!); const row: Row = { ...c, type: ClientScope.optional, - description: scope.description, + description: scope?.description, }; return row; }); @@ -113,7 +113,7 @@ export const ClientScopes = ({ const row: Row = { ...c, type: ClientScope.default, - description: scope.description, + description: scope?.description, }; return row; });