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 @@ -43,6 +43,7 @@ sealed class FlagKey<out T : Any> {
V2EncryptionTde,
NewItemTypes,
DebugDisableSelfHostPremiumCheck,
FillAssistTargetingRules,
)
}
}
Expand Down Expand Up @@ -152,6 +153,14 @@ sealed class FlagKey<out T : Any> {
override val defaultValue: Boolean = false
}

/**
* Data object holding the feature flag key for the Fill Assist Targeting Rules feature.
*/
data object FillAssistTargetingRules : FlagKey<Boolean>() {
override val keyName: String = "fill-assist-targeting-rules"
override val defaultValue: Boolean = 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 @@ -48,6 +48,10 @@ class FlagKeyTest {
FlagKey.NewItemTypes.keyName,
"pm-32009-new-item-types",
)
assertEquals(
FlagKey.FillAssistTargetingRules.keyName,
"fill-assist-targeting-rules",
)
assertEquals(
FlagKey.ManageDevices.keyName,
"pm-4516-devices-add-last-activity-date",
Expand All @@ -68,6 +72,7 @@ class FlagKeyTest {
FlagKey.V2EncryptionPassword,
FlagKey.V2EncryptionTde,
FlagKey.NewItemTypes,
FlagKey.FillAssistTargetingRules,
FlagKey.ManageDevices,
).all {
!it.defaultValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fun <T : Any> FlagKey<T>.ListItemContent(
FlagKey.V2EncryptionPassword,
FlagKey.V2EncryptionTde,
FlagKey.NewItemTypes,
FlagKey.FillAssistTargetingRules,
FlagKey.DebugDisableSelfHostPremiumCheck,
-> {
@Suppress("UNCHECKED_CAST")
Expand Down Expand Up @@ -94,6 +95,10 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
FlagKey.V2EncryptionPassword -> stringResource(BitwardenString.v2_encryption_password)
FlagKey.V2EncryptionTde -> stringResource(BitwardenString.v2_encryption_tde)
FlagKey.NewItemTypes -> stringResource(BitwardenString.new_item_types)
FlagKey.FillAssistTargetingRules -> {
stringResource(BitwardenString.fill_assist_targeting_rules)
}

FlagKey.DebugDisableSelfHostPremiumCheck -> {
stringResource(BitwardenString.debug_disable_self_host_premium_check)
}
Expand Down
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 @@ -52,6 +52,7 @@
<string name="v2_encryption_password">V2 Encryption - Password</string>
<string name="manage_devices">Manage devices</string>
<string name="new_item_types">New Item Types</string>
<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>

<!-- endregion Debug Menu -->
Expand Down
Loading