Skip to content

Commit

Permalink
[feat] introduce new remote user store impl - disable RemoteUserStore…
Browse files Browse the repository at this point in the history
…Manager in user/group lists
  • Loading branch information
JayaShakthi97 committed Nov 25, 2024
1 parent ae800bb commit 813c902
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
7 changes: 6 additions & 1 deletion features/admin.groups.v1/pages/groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ import { commonConfig, groupConfig, userstoresConfig } from "@wso2is/admin.exten
import { RootOnlyComponent } from "@wso2is/admin.organizations.v1/components";
import { useGetCurrentOrganizationType } from "@wso2is/admin.organizations.v1/hooks/use-get-organization-type";
import { getUserStoreList } from "@wso2is/admin.userstores.v1/api";
import { CONSUMER_USERSTORE, PRIMARY_USERSTORE } from "@wso2is/admin.userstores.v1/constants";
import {
CONSUMER_USERSTORE,
PRIMARY_USERSTORE,
RemoteUserStoreManagerType
} from "@wso2is/admin.userstores.v1/constants";
import { UserStorePostData } from "@wso2is/admin.userstores.v1/models/user-stores";
import { AlertInterface, AlertLevels, RolesInterface, UserstoreListResponseInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
Expand Down Expand Up @@ -199,6 +203,7 @@ const GroupsPage: FunctionComponent<any> = (): ReactElement => {

if (!isDisabled) {
storeOption = {
disabled: store.typeName === RemoteUserStoreManagerType.RemoteUserStoreManager,
key: index,
text: store.name,
value: store.name
Expand Down
2 changes: 2 additions & 0 deletions features/admin.users.v1/pages/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
useServerConfigs
} from "@wso2is/admin.server-configurations.v1";
import { useUserStores } from "@wso2is/admin.userstores.v1/api";
import { RemoteUserStoreManagerType } from "@wso2is/admin.userstores.v1/constants";
import {
UserStoreItem,
UserStoreListItem,
Expand Down Expand Up @@ -264,6 +265,7 @@ const UsersPage: FunctionComponent<UsersPageInterface> = (

if (!isDisabled) {
const storeOption: UserStoreItem = {
disabled: store.typeName === RemoteUserStoreManagerType.RemoteUserStoreManager,
key: index,
text: store.name,
value: store.name
Expand Down
1 change: 1 addition & 0 deletions features/admin.userstores.v1/models/user-stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,5 @@ export interface UserStoreItem {
key: number;
text: string;
value: string;
disabled?: boolean;
}
17 changes: 15 additions & 2 deletions modules/core/src/models/userstores.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2020-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 All @@ -16,6 +16,12 @@
* under the License.
*/

/**
* Userstore list response interface.
*
* @deprecated - This interface will be removed in the future. Use the interface from admin.userstores.v1.models.
* https://github.com/wso2-enterprise/asgardeo-product/issues/27546
*/
export interface UserstoreListResponseInterface {
/**
* base64 url encoded value of domain name.
Expand All @@ -34,17 +40,24 @@ export interface UserstoreListResponseInterface {
description: string;
/**
* Location of the created/updated resource.
* example: /t/{tenant-domain}/api/server/v1/userstores/SkRCQy1TRUNPTkRBUlk
* example: /t/\{tenant-domain\}/api/server/v1/userstores/SkRCQy1TRUNPTkRBUlk
*/
self: string;
/**
* Requested configured user store property for the set.
*/
properties: UserstorePropertiesResponseInterface[];
/**
* Name of the user store manager.
*/
typeName?: string;
}

/**
* Available User Store Properties interface.
*
* * @deprecated - This interface will be removed in the future. Use the interface from admin.userstores.v1.models.
* https://github.com/wso2-enterprise/asgardeo-product/issues/27546
*/
export interface UserstorePropertiesResponseInterface {
/**
Expand Down

0 comments on commit 813c902

Please sign in to comment.