Skip to content

Commit

Permalink
Merge pull request wso2#5478 from JayaShakthi97/fix-19297
Browse files Browse the repository at this point in the history
[bug-fix] Fix User Attributes tab visible logic in connection
  • Loading branch information
JayaShakthi97 authored Feb 12, 2024
2 parents 20c3b98 + 76b3ccb commit 1ed8922
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-kids-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/console": patch
---

Fix User Attributes tab visible logic in connection edit view
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export const EditConnection: FunctionComponent<EditConnectionPropsInterface> = (
* models folder for types. identity-provider.ts
*/
const attributesForSamlEnabled: boolean = isSaml &&
identityProviderConfig.editIdentityProvider.attributesSettings;
identityProviderConfig.editIdentityProvider.attributesSettings;

/**
* If the protocol is OIDC and if the Custom Claim Mapping feature is enabled
Expand All @@ -452,9 +452,10 @@ export const EditConnection: FunctionComponent<EditConnectionPropsInterface> = (
const isAttributesEnabledForOIDC: boolean = isOidc && UIConfig?.isCustomClaimMappingEnabled;

// Evaluate whether to Show/Hide `Attributes`.
if ((attributesForSamlEnabled || shouldShowTab(type, ConnectionTabTypes.USER_ATTRIBUTES))
&& (IdentityProviderManagementConstants.IDP_TEMPLATE_IDS.OIDC === type && isAttributesEnabledForOIDC)
&& !isOrganizationEnterpriseAuthenticator) {
if (shouldShowTab(type, ConnectionTabTypes.USER_ATTRIBUTES)
&& !isOrganizationEnterpriseAuthenticator
&& (type !== IdentityProviderManagementConstants.IDP_TEMPLATE_IDS.OIDC || isAttributesEnabledForOIDC)
&& (type !== IdentityProviderManagementConstants.IDP_TEMPLATE_IDS.SAML || attributesForSamlEnabled)) {
panes.push({
"data-tabid": ConnectionManagementConstants.ATTRIBUTES_TAB_ID,
menuItem: "Attributes",
Expand Down

0 comments on commit 1ed8922

Please sign in to comment.