mirror of
https://github.com/bitwarden/android.git
synced 2026-08-24 14:28:58 -05:00
[PM-17405] Add mutual TLS feature flag (#4606)
This commit is contained in:
@@ -39,6 +39,7 @@ sealed class FlagKey<out T : Any> {
|
||||
NewDevicePermanentDismiss,
|
||||
NewDeviceTemporaryDismiss,
|
||||
IgnoreEnvironmentCheck,
|
||||
MutualTls,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -171,6 +172,15 @@ sealed class FlagKey<out T : Any> {
|
||||
override val isRemotelyConfigured: Boolean = false
|
||||
}
|
||||
|
||||
/**
|
||||
* Data object holding the feature flag key for the Mutual TLS feature.
|
||||
*/
|
||||
data object MutualTls : FlagKey<Boolean>() {
|
||||
override val keyName: String = "mutual-tls"
|
||||
override val defaultValue: Boolean = false
|
||||
override val isRemotelyConfigured: Boolean = false
|
||||
}
|
||||
|
||||
//region Dummy keys for testing
|
||||
/**
|
||||
* Data object holding the key for a [Boolean] flag to be used in tests.
|
||||
|
||||
+2
@@ -38,6 +38,7 @@ fun <T : Any> FlagKey<T>.ListItemContent(
|
||||
FlagKey.NewDevicePermanentDismiss,
|
||||
FlagKey.NewDeviceTemporaryDismiss,
|
||||
FlagKey.IgnoreEnvironmentCheck,
|
||||
FlagKey.MutualTls,
|
||||
-> BooleanFlagItem(
|
||||
label = flagKey.getDisplayLabel(),
|
||||
key = flagKey as FlagKey<Boolean>,
|
||||
@@ -90,4 +91,5 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
|
||||
FlagKey.NewDevicePermanentDismiss -> stringResource(R.string.new_device_permanent_dismiss)
|
||||
FlagKey.NewDeviceTemporaryDismiss -> stringResource(R.string.new_device_temporary_dismiss)
|
||||
FlagKey.IgnoreEnvironmentCheck -> stringResource(R.string.ignore_environment_check)
|
||||
FlagKey.MutualTls -> stringResource(R.string.mutual_tls)
|
||||
}
|
||||
|
||||
@@ -1120,4 +1120,5 @@ Do you want to switch to this account?</string>
|
||||
<string name="you_ll_only_need_to_set_up_authenticator_key">You’ll only need to set up Authenticator Key for logins that require two-factor authentication with a code. The key will continuously generate six-digit codes you can use to log in.</string>
|
||||
<string name="coachmark_3_of_3">3 of 3</string>
|
||||
<string name="you_must_add_a_web_address_to_use_autofill_to_access_this_account">You must add a web address to use autofill to access this account.</string>
|
||||
<string name="mutual_tls">Mutual TLS</string>
|
||||
</resources>
|
||||
|
||||
+2
@@ -120,6 +120,7 @@ private val DEFAULT_MAP_VALUE: Map<FlagKey<Any>, Any> = mapOf(
|
||||
FlagKey.NewDeviceTemporaryDismiss to true,
|
||||
FlagKey.NewDevicePermanentDismiss to true,
|
||||
FlagKey.IgnoreEnvironmentCheck to true,
|
||||
FlagKey.MutualTls to true,
|
||||
)
|
||||
|
||||
private val UPDATED_MAP_VALUE: Map<FlagKey<Any>, Any> = mapOf(
|
||||
@@ -136,6 +137,7 @@ private val UPDATED_MAP_VALUE: Map<FlagKey<Any>, Any> = mapOf(
|
||||
FlagKey.NewDeviceTemporaryDismiss to false,
|
||||
FlagKey.NewDevicePermanentDismiss to false,
|
||||
FlagKey.IgnoreEnvironmentCheck to false,
|
||||
FlagKey.MutualTls to false,
|
||||
)
|
||||
|
||||
private val DEFAULT_STATE = DebugMenuState(
|
||||
|
||||
Reference in New Issue
Block a user