DenyListStrategy

@Serializable
@SerialName(value = "denyList")
data class DenyListStrategy(val denyList: Set<String>) : FlippingStrategy(source)

A strategy that disables a feature for users in a deny list.

Requires ContextKeys.USER_ID to be set in the FlippingExecutionContext. Returns true if no user ID is present (allow by default) or if the user is not in the deny list.

Constructors

Link copied to clipboard
constructor(denyList: Set<String>)

Properties

Link copied to clipboard

The set of user IDs for whom the feature is disabled.

Functions

Link copied to clipboard

Combines this strategy with other using logical AND.

Link copied to clipboard
open suspend override fun evaluate(featureId: String, store: FeatureStore?, context: FlippingExecutionContext): Boolean

Evaluates whether the feature should be enabled based on the execution context.

Link copied to clipboard

Negates this strategy.

Link copied to clipboard

Combines this strategy with other using logical OR.