Skip to content

Commit

Permalink
Merge pull request #6055 from DilshanSenarath/managed-by
Browse files Browse the repository at this point in the history
Add 'Managed by' property as 'Parent Organization' for invited users
  • Loading branch information
sadilchamishka authored Apr 24, 2024
2 parents 1eed218 + a648798 commit 697dd6c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-seas-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/features": patch
---

add 'Managed by' property as 'Parent Organization' for invited users
17 changes: 11 additions & 6 deletions features/admin.users.v1/components/users-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ export const UsersList: React.FunctionComponent<UsersListProps> = (props: UsersL
};

const renderUserIdp = (user: UserBasicInterface): string => {
if (user[SCIMConfigs?.scim?.enterpriseSchema]?.managedOrg) {
return UserManagementConstants.MANAGED_BY_PARENT_TEXT;
}

const userStore: string = user?.userName?.split("/").length > 1
? user?.userName?.split("/")[0]?.toUpperCase()
: userstoresConfig.primaryUserstoreName;
Expand Down Expand Up @@ -313,12 +317,13 @@ export const UsersList: React.FunctionComponent<UsersListProps> = (props: UsersL
<div>
{ header as ReactNode }
{
user[SCIMConfigs.scim.enterpriseSchema]?.managedOrg && (
<Label size="mini" className="client-id-label">
{ t("parentOrgInvitations:" +
"invitedUserLabel") }
</Label>
)
userConfig?.disableManagedByColumn
&& user[SCIMConfigs?.scim?.enterpriseSchema]?.managedOrg
&& (
<Label size="mini" className="client-id-label">
{ t("parentOrgInvitations:invitedUserLabel") }
</Label>
)
}
</div>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ export class UserManagementConstants {
public static readonly ERROR_COLLABORATOR_USER_LIMIT_REACHED: string = "ASG-UIM-10010";
// Query param to exclude groups from getUserList API call.
public static readonly GROUPS_ATTRIBUTE: string = "groups";

public static readonly MANAGED_BY_PARENT_TEXT: string = "Parent Organization";
}

/**
Expand Down

0 comments on commit 697dd6c

Please sign in to comment.