Skip to content

Commit

Permalink
Merge pull request #7397 from ShanChathusanda93/sub-org-app-edit-branch
Browse files Browse the repository at this point in the history
Hide unwanted tabs from the sub organization application edit view and restrict calling the organization get API
  • Loading branch information
ShanChathusanda93 authored Jan 26, 2025
2 parents d21ef09 + f2781e4 commit 9547d7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-clocks-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/admin.applications.v1": patch
---

hide tabs in app edit for sub org apps
11 changes: 6 additions & 5 deletions features/admin.applications.v1/components/edit-application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
}
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)
Expand Down Expand Up @@ -841,7 +841,8 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
}
if (isFeatureEnabled(featureConfig?.applications,
ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_SIGN_ON_METHOD_CONFIG"))
&& !isM2MApplication) {
&& !isM2MApplication
&& (isSuperOrganization() || (isSubOrganization() && isFragmentApp))) {

applicationConfig.editApplication.
isTabEnabledForApp(
Expand All @@ -859,7 +860,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
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)) {
Expand All @@ -875,7 +876,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
}
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)) {
Expand Down Expand Up @@ -928,7 +929,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
}
if (isFeatureEnabled(featureConfig?.applications,
ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_INFO"))
&& !isFragmentApp
&& !isSubOrganization()
&& !isMyAccount) {

applicationConfig.editApplication.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export const InboundOIDCForm: FunctionComponent<InboundOIDCFormPropsInterface> =
const TLS_CLIENT_AUTH: string = "tls_client_auth";

useEffect(() => {
if (sharedOrganizationsList) {
if (sharedOrganizationsList || orgType === OrganizationType.SUBORGANIZATION) {
return;
}

Expand Down Expand Up @@ -454,7 +454,7 @@ export const InboundOIDCForm: FunctionComponent<InboundOIDCFormPropsInterface> =
);
}
);
}, [ application ]);
}, [ application, orgType ]);

const fetchLocalClaims = () => {
getAllLocalClaims(null)
Expand Down

0 comments on commit 9547d7e

Please sign in to comment.