Skip to content

Commit 49d3347

Browse files
upcoming: [DI-25384] - Added open flag for aclp (linode#12302)
* upcoming: [DI-25384] - Added open flag for aclp * Added changeset * updated changeset * upcoming: [DI-25384] - renamed flag name * lint fix * Update packages/manager/.changeset/pr-12302-added-1748592683984.md Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> --------- Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
1 parent d7cd5ee commit 49d3347

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Added
3+
---
4+
5+
`bypassAccountCapabilities` property to `aclp` feature flag ([#12302](https://github.com/linode/manager/pull/12302))

packages/manager/src/featureFlags.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ interface GeckoFeatureFlag extends BaseFeatureFlag {
6161

6262
interface AclpFlag {
6363
beta: boolean;
64+
bypassAccountCapabilities?: boolean;
6465
enabled: boolean;
6566
}
6667

packages/manager/src/features/CloudPulse/Utils/utils.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ export const useIsACLPEnabled = (): {
3232
return { isACLPEnabled: false };
3333
}
3434

35-
const isACLPEnabled = isFeatureEnabledV2(
36-
'Akamai Cloud Pulse',
37-
Boolean(flags.aclp?.enabled),
38-
account?.capabilities ?? []
39-
);
35+
const isACLPEnabled =
36+
(flags.aclp?.enabled && flags.aclp?.bypassAccountCapabilities) ||
37+
isFeatureEnabledV2(
38+
'Akamai Cloud Pulse',
39+
Boolean(flags.aclp?.enabled),
40+
account?.capabilities ?? []
41+
);
4042

4143
return { isACLPEnabled };
4244
};

0 commit comments

Comments
 (0)