Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide new remote user stores in administrators listing #7187

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-eggs-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/admin.console-settings.v1": patch
---

Hide new remote user stores in administrators listing
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2023-2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -27,6 +27,7 @@ import { userstoresConfig } from "@wso2is/admin.extensions.v1";
import FeatureGateConstants from "@wso2is/admin.feature-gate.v1/constants/feature-gate-constants";
import { useGetCurrentOrganizationType } from "@wso2is/admin.organizations.v1/hooks/use-get-organization-type";
import { useUserStores } from "@wso2is/admin.userstores.v1/api";
import { RemoteUserStoreManagerType } from "@wso2is/admin.userstores.v1/constants/user-store-constants";
import { UserStoreDropdownItem, UserStoreListItem, UserStorePostData } from "@wso2is/admin.userstores.v1/models";
import { IdentifiableComponentInterface } from "@wso2is/core/models";
import React, {
Expand Down Expand Up @@ -118,6 +119,11 @@ const ConsoleAdministrators: FunctionComponent<ConsoleAdministratorsInterface> =
};

userStoreList?.forEach((store: UserStoreListItem, index: number) => {
// Skip the remote user store in administrators listing as it is not supporting user listing.
if (store?.typeName === RemoteUserStoreManagerType.RemoteUserStoreManager) {
return;
}

if (store?.name?.toUpperCase() !== userstoresConfig?.primaryUserstoreName) {
getAUserStore(store.id).then((response: UserStorePostData) => {
const isDisabled: boolean = response.properties.find(
Expand Down
Loading