[PM-31613] Add send email verification feature flag (#6470)

This commit is contained in:
aj-rosado 2026-02-03 17:09:15 +00:00 committed by GitHub
parent 4cac4d6a6e
commit b0eea88af2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 0 deletions

View File

@ -37,6 +37,7 @@ sealed class FlagKey<out T : Any> {
NoLogoutOnKdfChange,
MigrateMyVaultToMyItems,
ArchiveItems,
SendEmailVerification,
)
}
}
@ -107,6 +108,14 @@ sealed class FlagKey<out T : Any> {
override val defaultValue: Boolean = false
}
/**
* Data object holding the feature flag key for the Send Email Verification feature.
*/
data object SendEmailVerification : FlagKey<Boolean>() {
override val keyName: String = "pm-19051-send-email-verification"
override val defaultValue: Boolean = false
}
//region Dummy keys for testing
/**
* Data object holding the key for a [Boolean] flag to be used in tests.

View File

@ -36,6 +36,10 @@ class FlagKeyTest {
FlagKey.ArchiveItems.keyName,
"pm-19148-innovation-archive",
)
assertEquals(
FlagKey.SendEmailVerification.keyName,
"pm-19051-send-email-verification",
)
}
@Test
@ -49,6 +53,7 @@ class FlagKeyTest {
FlagKey.ForceUpdateKdfSettings,
FlagKey.MigrateMyVaultToMyItems,
FlagKey.ArchiveItems,
FlagKey.SendEmailVerification,
).all {
!it.defaultValue
},

View File

@ -31,6 +31,7 @@ fun <T : Any> FlagKey<T>.ListItemContent(
FlagKey.NoLogoutOnKdfChange,
FlagKey.MigrateMyVaultToMyItems,
FlagKey.ArchiveItems,
FlagKey.SendEmailVerification,
-> {
@Suppress("UNCHECKED_CAST")
BooleanFlagItem(
@ -83,4 +84,5 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
FlagKey.MigrateMyVaultToMyItems -> stringResource(BitwardenString.migrate_my_vault_to_my_items)
FlagKey.ArchiveItems -> stringResource(BitwardenString.archive_items)
FlagKey.SendEmailVerification -> stringResource(BitwardenString.send_email_verification)
}

View File

@ -40,6 +40,7 @@
<string name="avoid_logout_on_kdf_change">Avoid logout on KDF change</string>
<string name="migrate_my_vault_to_my_items">Migrate My Vault to My Items</string>
<string name="archive_items">Archive Items</string>
<string name="send_email_verification">Send Email Verification</string>
<!-- endregion Debug Menu -->
</resources>