diff --git a/apps/console/src/features/roles/api/roles.ts b/apps/console/src/features/roles/api/roles.ts index b883eba2ed9..f852bead6c7 100644 --- a/apps/console/src/features/roles/api/roles.ts +++ b/apps/console/src/features/roles/api/roles.ts @@ -427,7 +427,7 @@ export const useRolesList = ( filter?: string @@ -468,7 +468,7 @@ export const useAPIResourcesList = ` * @throws `IdentityAppsApiException` - * @deprecated This is a temporary hook until the API resources is moved to features. + * @deprecated This is a temporary hook until the API resource feature moved to the features folder. */ export const useAPIResourceDetails = ( apiResourceId: string @@ -503,7 +503,7 @@ export const useAPIResourceDetails = ( applicationId: string diff --git a/apps/console/src/features/roles/components/wizard-updated/role-permissions/role-permissions.tsx b/apps/console/src/features/roles/components/wizard-updated/role-permissions/role-permissions.tsx index c4b09eb35e8..fd0679bc24c 100644 --- a/apps/console/src/features/roles/components/wizard-updated/role-permissions/role-permissions.tsx +++ b/apps/console/src/features/roles/components/wizard-updated/role-permissions/role-permissions.tsx @@ -147,17 +147,19 @@ export const RolePermissionsList: FunctionComponent = const options: DropdownProps[] = []; if(roleAudience === RoleAudienceTypes.ORGANIZATION) { - // // API resources list options when role audience is "organization". - apiResourcesList?.apiResources?.map((apiResource: APIResourceInterface) => { - if (!selectedAPIResources.find((selectedAPIResource: APIResourceInterface) => - selectedAPIResource?.id === apiResource?.id)) { - options.push({ - key: apiResource.id, - text: apiResource.name, - value: apiResource.id - }); - } - }); + // API resources list options when role audience is "organization". + apiResourcesList?.apiResources?.map( + (apiResource: APIResourceInterface) => { + if (!selectedAPIResources.find( + (selectedAPIResource: APIResourceInterface) => + selectedAPIResource?.id === apiResource?.id)) { + options.push({ + key: apiResource.id, + text: apiResource.name, + value: apiResource.id + }); + } + }); } else { // API resources list options when role audience is "application". authorizedAPIListForApplication?.map((api: AuthorizedAPIListItemInterface) => {