Skip to content

Commit

Permalink
Enable simplified my account settings by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasasr1 committed Jun 10, 2024
1 parent 3aaec8c commit b8046a8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
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 b8046a8

Please sign in to comment.