Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ sealed class FlagKey<out T : Any> {
DebugDisableSelfHostPremiumCheck,
FillAssistTargetingRules,
PoliciesInAcceptedState,
FedRamp,
)
}
}
Expand Down Expand Up @@ -170,6 +171,14 @@ sealed class FlagKey<out T : Any> {
override val defaultValue: Boolean get() = false
}

/**
* Data object holding the feature flag key for the FedRAMP feature.
*/
data object FedRamp : FlagKey<Boolean>() {
override val keyName: String get() = "fedramp-gov-region"
override val defaultValue: Boolean get() = false
}

/**
* Debug-only flag that, when enabled, makes self-hosted environments behave as cloud
* environments for premium-upgrade gating. Used by QA to test the premium upgrade flow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ class FlagKeyTest {
FlagKey.PoliciesInAcceptedState.keyName,
"pm-34145-policies-in-accepted-state",
)
assertEquals(
FlagKey.FedRamp.keyName,
"fedramp-gov-region",
)
}

@Test
Expand All @@ -79,6 +83,7 @@ class FlagKeyTest {
FlagKey.FillAssistTargetingRules,
FlagKey.ManageDevices,
FlagKey.PoliciesInAcceptedState,
FlagKey.FedRamp,
).all {
!it.defaultValue
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fun <T : Any> FlagKey<T>.ListItemContent(
FlagKey.FillAssistTargetingRules,
FlagKey.DebugDisableSelfHostPremiumCheck,
FlagKey.PoliciesInAcceptedState,
FlagKey.FedRamp,
-> {
@Suppress("UNCHECKED_CAST")
BooleanFlagItem(
Expand Down Expand Up @@ -101,4 +102,6 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
FlagKey.DebugDisableSelfHostPremiumCheck -> {
stringResource(BitwardenString.debug_disable_self_host_premium_check)
}

FlagKey.FedRamp -> stringResource(BitwardenString.fed_ramp)
}
1 change: 1 addition & 0 deletions ui/src/main/res/values/strings_non_localized.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<string name="fill_assist_targeting_rules">Fill Assist Targeting Rules</string>
<string name="debug_disable_self_host_premium_check">Debug: Disable self-host premium check</string>
<string name="policies_in_accepted_state">Policies in accepted state</string>
<string name="fed_ramp">FedRAMP</string>

<!-- endregion Debug Menu -->
</resources>
Loading