Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply feature flags for actions feature. #7403

Merged
merged 2 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/eight-hairs-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@wso2is/admin.actions.v1": patch
"@wso2is/console": patch
---

Apply feature flags for actions.
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
Loading