Skip to content

Commit

Permalink
Merge pull request #6425 from Yasasr1/remove-my-account-config
Browse files Browse the repository at this point in the history
Enable simplified my account settings by default.
  • Loading branch information
Yasasr1 authored Jun 11, 2024
2 parents 548bc0b + 1aedc77 commit 9b5c3b5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .changeset/healthy-games-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@wso2is/admin.applications.v1": patch
"@wso2is/admin.extensions.v1": patch
"@wso2is/console": patch
---

Enable simplified my account settings by default
3 changes: 1 addition & 2 deletions apps/console/src/public/deployment.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@
"disabledFeatures": [
"applications.loginFlow.ai",
"applications.loginFlow.legacyEditor",
"applications.myaccount.saasMyaccountSettings",
"applications.myaccount.simplifiedSettings"
"applications.myaccount.saasMyaccountSettings"
],
"enabled": true,
"scopes": {
Expand Down
15 changes: 6 additions & 9 deletions features/admin.applications.v1/components/edit-application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,8 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =

const isFragmentApp: boolean = application?.advancedConfigurations?.fragment || false;
const hiddenAuthenticators: string[] = [ ...(UIConfig?.hiddenAuthenticators ?? []) ];
const disabledApplicationFeatures: string[] = useSelector((state: AppState) =>
state.config.ui.features.applications?.disabledFeatures);
const isMyAccountSimplifiedSettingsEnabled: boolean =
ApplicationManagementConstants.MY_ACCOUNT_CLIENT_ID === application?.clientId
&& !disabledApplicationFeatures?.includes("applications.myaccount.simplifiedSettings");
const isMyAccount: boolean =
ApplicationManagementConstants.MY_ACCOUNT_CLIENT_ID === application?.clientId;
const applicationsUpdateScopes: string[] = featureConfig?.applications?.scopes?.update;

const { isSubOrganization } = useGetCurrentOrganizationType();
Expand Down Expand Up @@ -242,7 +239,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
}

if (featureConfig) {
if (!legacyAuthzRuntime && isMyAccountSimplifiedSettingsEnabled) {
if (!legacyAuthzRuntime && isMyAccount) {
panes.push({
componentId: "overview",
menuItem: t("applications:myaccount.overview.tabName"),
Expand All @@ -252,7 +249,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
if (isFeatureEnabled(featureConfig?.applications,
ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_GENERAL_SETTINGS"))
&& !isSubOrganization()
&& (legacyAuthzRuntime || !isMyAccountSimplifiedSettingsEnabled)) {
&& (legacyAuthzRuntime || !isMyAccount)) {
if (applicationConfig.editApplication.
isTabEnabledForApp(
inboundProtocolConfig?.oidc?.clientId,
Expand Down Expand Up @@ -281,7 +278,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
if (isFeatureEnabled(featureConfig?.applications,
ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_ACCESS_CONFIG"))
&& !isFragmentApp
&& (legacyAuthzRuntime || !isMyAccountSimplifiedSettingsEnabled)
&& (legacyAuthzRuntime || !isMyAccount)
) {

applicationConfig.editApplication.isTabEnabledForApp(
Expand Down Expand Up @@ -400,7 +397,7 @@ export const EditApplication: FunctionComponent<EditApplicationPropsInterface> =
if (isFeatureEnabled(featureConfig?.applications,
ApplicationManagementConstants.FEATURE_DICTIONARY.get("APPLICATION_EDIT_INFO"))
&& !isFragmentApp
&& (legacyAuthzRuntime || !isMyAccountSimplifiedSettingsEnabled)) {
&& (legacyAuthzRuntime || !isMyAccount)) {
applicationConfig.editApplication.
isTabEnabledForApp(
inboundProtocolConfig?.oidc?.clientId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import {
Heading,
Link,
Popup,
Text
Text,
useDocumentation
} from "@wso2is/react-components";
import React, { FunctionComponent, ReactElement } from "react";
import { Trans, useTranslation } from "react-i18next";
Expand All @@ -42,6 +43,7 @@ export const MyAccountOverview: FunctionComponent<IdentifiableComponentInterface
const consumerAccountURL: string = useSelector((state: AppState) =>
state?.config?.deployment?.accountApp?.tenantQualifiedPath);
const { t } = useTranslation();
const { getLink } = useDocumentation();

return (
<EmphasizedSegment padded="very">
Expand All @@ -52,8 +54,7 @@ export const MyAccountOverview: FunctionComponent<IdentifiableComponentInterface
<Text>
{ t("applications:myaccount.overview.contentIntro") }
<DocumentationLink
link={ "develop.applications.myaccount.overview.learnMore" }
isLinkRef
link={ getLink("develop.applications.myaccount.overview.learnMore") }
>
<Trans
i18nKey={ "extensions:common.learnMore" }
Expand Down

0 comments on commit 9b5c3b5

Please sign in to comment.