Skip to content

Commit

Permalink
Merge pull request #5763 from brionmario/post-is7-fixes-22569
Browse files Browse the repository at this point in the history
Fix tab getting removed in shared apps
  • Loading branch information
brionmario authored Mar 15, 2024
2 parents a9fef34 + 9879e1b commit 8eae2e1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-owls-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/console": patch
---

Fix tab getting removed in Shared apps
5 changes: 3 additions & 2 deletions apps/console/src/extensions/configs/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,13 @@ export const applicationConfig: ApplicationConfig = {
&& (!application?.advancedConfigurations?.fragment || window["AppUtils"].getConfig().ui.features?.
applicationRoles?.enabled)
&& (
application?.templateId === ApplicationManagementConstants.CUSTOM_APPLICATION_OIDC
application?.advancedConfigurations?.fragment ||
(application?.templateId === ApplicationManagementConstants.CUSTOM_APPLICATION_OIDC
|| application?.templateId === ApplicationManagementConstants.CUSTOM_APPLICATION_SAML
|| application?.templateId === MobileAppTemplate?.id
|| application?.templateId === OIDCWebAppTemplate?.id
|| application?.templateId === SinglePageAppTemplate?.id
|| application?.templateId === SamlWebAppTemplate?.id
|| application?.templateId === SamlWebAppTemplate?.id)
)
&& application.name !== ApplicationManagementConstants.MY_ACCOUNT_APP_NAME
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,10 @@ const ApplicationEditPage: FunctionComponent<ApplicationEditPageInterface> = (
* {@link ApplicationManagementConstants.CUSTOM_APPLICATION_OIDC} to it.
* Additionally @see InboundFormFactory.
*/
if (!application?.templateId) {
if (!application?.advancedConfigurations?.fragment && !application?.templateId) {
if (application?.inboundProtocols?.length > 0) {
// FIXME: `application` object is directly mutated here causing unpredictable side effects.
// Tracker: https://github.com/wso2/product-is/issues/20016
application.templateId = InboundProtocolDefaultFallbackTemplates.get(
application.inboundProtocols[ 0 /*We pick the first*/ ].type
) ?? ApplicationManagementConstants.CUSTOM_APPLICATION_OIDC;
Expand Down

0 comments on commit 8eae2e1

Please sign in to comment.