diff --git a/frontend/src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategyAccordion/FeatureStrategyAccordionBody/FeatureStrategyAccordionBody.tsx b/frontend/src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategyAccordion/FeatureStrategyAccordionBody/FeatureStrategyAccordionBody.tsx
index 2de084bb43..d28e4096a6 100644
--- a/frontend/src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategyAccordion/FeatureStrategyAccordionBody/FeatureStrategyAccordionBody.tsx
+++ b/frontend/src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategyAccordion/FeatureStrategyAccordionBody/FeatureStrategyAccordionBody.tsx
@@ -148,6 +148,17 @@ const FeatureStrategyAccordionBody: React.FC<
const { parameters } = strategy;
const ON = uiConfig.flags[C];
+ const editable = hasAccess(
+ UPDATE_FEATURE_STRATEGY,
+ projectId,
+ activeEnvironment.name
+ ) ||
+ hasAccess(
+ CREATE_FEATURE_STRATEGY,
+ projectId,
+ activeEnvironment.name
+ );
+
return (
-
- }
+
{children}
diff --git a/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/FlexibleStrategy/FlexibleStrategy.tsx b/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/FlexibleStrategy/FlexibleStrategy.tsx
index 25b4221eda..d0ffcea5cd 100644
--- a/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/FlexibleStrategy/FlexibleStrategy.tsx
+++ b/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/FlexibleStrategy/FlexibleStrategy.tsx
@@ -22,12 +22,14 @@ interface IFlexibleStrategyProps {
parameters: IParameter;
updateParameter: (field: string, value: any) => void;
context: any;
+ editable: boolean;
}
const FlexibleStrategy = ({
updateParameter,
parameters,
context,
+ editable=true
}: IFlexibleStrategyProps) => {
const onUpdate =
(field: string) =>
@@ -66,6 +68,7 @@ const FlexibleStrategy = ({
@@ -96,6 +99,7 @@ const FlexibleStrategy = ({
label="Stickiness"
options={stickinessOptions}
value={stickiness}
+ disabled={!editable}
data-test={FLEXIBLE_STRATEGY_STICKINESS_ID}
onChange={e =>
onUpdate('stickiness')(e, e.target.value as number)
@@ -126,6 +130,7 @@ const FlexibleStrategy = ({
onUpdate('groupId')(e, e.target.value)}
data-test={FLEXIBLE_STRATEGY_GROUP_ID}
/>
diff --git a/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/GeneralStrategy/GeneralStrategy.tsx b/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/GeneralStrategy/GeneralStrategy.tsx
index 9b6d8a9b1f..131bf391d8 100644
--- a/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/GeneralStrategy/GeneralStrategy.tsx
+++ b/frontend/src/component/feature/FeatureView2/FeatureStrategies/common/GeneralStrategy/GeneralStrategy.tsx
@@ -66,6 +66,7 @@ const GeneralStrategy = ({