Skip to content

Commit

Permalink
Apply feature flags for actions feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
malithie committed Jan 26, 2025
1 parent d21ef09 commit 991d9c7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/console/src/public/deployment.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@
},
"actions": {
"disabledFeatures": [
"actions.filterPreRegistration",
"actions.filterPreUpdateProfile"
"actions.types.list.preRegistration",
"actions.types.list.preUpdateProfile"
],
"enabled": true,
"featureFlags": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { AppState } from "@wso2is/admin.core.v1";
import useGetRulesMeta from "@wso2is/admin.rules.v1/api/use-get-rules-meta";
import { RuleExecuteCollectionWithoutIdInterface, RuleWithoutIdInterface } from "@wso2is/admin.rules.v1/models/rules";
import { getRuleInstanceValue } from "@wso2is/admin.rules.v1/providers/rules-provider";
import { isFeatureEnabled } from "@wso2is/core/helpers";
import { IdentifiableComponentInterface } from "@wso2is/core/models";
import { FinalForm, FormRenderProps, FormSpy } from "@wso2is/form";
import { EmphasizedSegment } from "@wso2is/react-components";
Expand Down Expand Up @@ -108,7 +109,8 @@ const PreIssueAccessTokenActionConfigForm: FunctionComponent<PreIssueAccessToken
} = useGetRulesMeta(actionTypeApiPath);

// TODO: Temporary flag to show/hide the rule component.
const showRuleComponent: boolean = false;
const showRuleComponent: boolean = isFeatureEnabled(
actionsFeatureConfig, "actions.types.preIssueAccessToken.edit.rule");

/**
* The following useEffect is used to set the current Action Authentication Type.
Expand Down
8 changes: 4 additions & 4 deletions features/admin.actions.v1/pages/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ export const ActionTypesListingPage: FunctionComponent<ActionTypesListingPageInt

switch (actionType) {
case ActionsConstants.PRE_ISSUE_ACCESS_TOKEN_URL_PATH:
return isFeatureEnabled(actionsFeatureConfig, "actions.filterPreIssueAccessToken");
return isFeatureEnabled(actionsFeatureConfig, "actions.types.list.preIssueAccessToken");
case ActionsConstants.PRE_UPDATE_PASSWORD_URL_PATH:
return isFeatureEnabled(actionsFeatureConfig, "actions.filterPreUpdatePassword");
return isFeatureEnabled(actionsFeatureConfig, "actions.types.list.preUpdatePassword");
case ActionsConstants.PRE_UPDATE_PROFILE_URL_PATH:
return isFeatureEnabled(actionsFeatureConfig, "actions.filterPreUpdateProfile");
return isFeatureEnabled(actionsFeatureConfig, "actions.types.list.preUpdateProfile");
case ActionsConstants.PRE_REGISTRATION_URL_PATH:
return isFeatureEnabled(actionsFeatureConfig, "actions.filterPreRegistration");
return isFeatureEnabled(actionsFeatureConfig, "actions.types.list.preRegistration");
default:
return false;
}
Expand Down

0 comments on commit 991d9c7

Please sign in to comment.