Normally, the individual fields in the config.yml are an OR condition. In this example, the feature is enabled if the environment variable returns true or if the logged in user contains the ROLE_ADMIN role.
It would be interesting to be able to modify the strategy so that it becomes an AND condition. If you change the strategy and use the same example, the feature would only be enabled if the environment variable returns true AND the user contains the ROLE_ADMIN role.
# config.yml
flagception:
features:
feature_123:
env: FOOBAR
roles: ROLE_ADMIN
feature_345:
env: FOOBAR
roles: ROLE_ADMIN
strategy: single # Overwrite the global strategy for this feature)
# Set global for all (Default: single)
config:
strategy: all
all => All defined conditions must match for activating this feature
single => at least one condition must match for activating this feature
Normally, the individual fields in the config.yml are an OR condition. In this example, the feature is enabled if the environment variable returns true or if the logged in user contains the ROLE_ADMIN role.
It would be interesting to be able to modify the strategy so that it becomes an AND condition. If you change the strategy and use the same example, the feature would only be enabled if the environment variable returns true AND the user contains the ROLE_ADMIN role.
all => All defined conditions must match for activating this feature single => at least one condition must match for activating this feature