From f2781e4a69965864b7f58255df1516e2bb322a7a Mon Sep 17 00:00:00 2001 From: Shan Chathusanda Jayathilaka Date: Sat, 25 Jan 2025 20:18:17 +0530 Subject: [PATCH] Hide unwanted tabs from the sub organization application edit view --- .changeset/strong-clocks-clean.md | 5 +++++ .../components/edit-application.tsx | 11 ++++++----- .../components/forms/inbound-oidc-form.tsx | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .changeset/strong-clocks-clean.md diff --git a/.changeset/strong-clocks-clean.md b/.changeset/strong-clocks-clean.md new file mode 100644 index 00000000000..5772202c1b1 --- /dev/null +++ b/.changeset/strong-clocks-clean.md @@ -0,0 +1,5 @@ +--- +"@wso2is/admin.applications.v1": patch +--- + +hide tabs in app edit for sub org apps diff --git a/features/admin.applications.v1/components/edit-application.tsx b/features/admin.applications.v1/components/edit-application.tsx index c43b932eaf9..dd4760fe493 100644 --- a/features/admin.applications.v1/components/edit-application.tsx +++ b/features/admin.applications.v1/components/edit-application.tsx @@ -813,7 +813,7 @@ export const EditApplication: FunctionComponent = } if (isFeatureEnabled(featureConfig?.applications, ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_ATTRIBUTE_MAPPING")) - && !isFragmentApp + && !isSubOrganization() && !isM2MApplication && (UIConfig?.legacyMode?.applicationSystemAppsSettings || application?.name !== ApplicationManagementConstants.MY_ACCOUNT_APP_NAME) @@ -841,7 +841,8 @@ export const EditApplication: FunctionComponent = } if (isFeatureEnabled(featureConfig?.applications, ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_SIGN_ON_METHOD_CONFIG")) - && !isM2MApplication) { + && !isM2MApplication + && (isSuperOrganization() || (isSubOrganization() && isFragmentApp))) { applicationConfig.editApplication. isTabEnabledForApp( @@ -859,7 +860,7 @@ export const EditApplication: FunctionComponent = if (applicationConfig.editApplication.showProvisioningSettings && isFeatureEnabled(featureConfig?.applications, ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_PROVISIONING_SETTINGS")) - && !isFragmentApp + && !isSubOrganization() && !isM2MApplication && (UIConfig?.legacyMode?.applicationSystemAppsSettings || application?.name !== ApplicationManagementConstants.MY_ACCOUNT_APP_NAME)) { @@ -875,7 +876,7 @@ export const EditApplication: FunctionComponent = } if (isFeatureEnabled(featureConfig?.applications, ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_ADVANCED_SETTINGS")) - && !isFragmentApp + && !isSubOrganization() && !isM2MApplication && (UIConfig?.legacyMode?.applicationSystemAppsSettings || application?.name !== ApplicationManagementConstants.MY_ACCOUNT_APP_NAME)) { @@ -928,7 +929,7 @@ export const EditApplication: FunctionComponent = } if (isFeatureEnabled(featureConfig?.applications, ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_INFO")) - && !isFragmentApp + && !isSubOrganization() && !isMyAccount) { applicationConfig.editApplication. diff --git a/features/admin.applications.v1/components/forms/inbound-oidc-form.tsx b/features/admin.applications.v1/components/forms/inbound-oidc-form.tsx index ad785560e78..a8d32c66688 100644 --- a/features/admin.applications.v1/components/forms/inbound-oidc-form.tsx +++ b/features/admin.applications.v1/components/forms/inbound-oidc-form.tsx @@ -420,7 +420,7 @@ export const InboundOIDCForm: FunctionComponent = const TLS_CLIENT_AUTH: string = "tls_client_auth"; useEffect(() => { - if (sharedOrganizationsList) { + if (sharedOrganizationsList || orgType === OrganizationType.SUBORGANIZATION) { return; } @@ -454,7 +454,7 @@ export const InboundOIDCForm: FunctionComponent = ); } ); - }, [ application ]); + }, [ application, orgType ]); const fetchLocalClaims = () => { getAllLocalClaims(null)