- Issue created by @djdevin
- π¬π§United Kingdom welly
I think this can probably be done with Cookie Condition ( https://www.drupal.org/project/cookie_condition β ) in combination with Feature Toggle i some cases - for example, blocks, but would agree it'd be a useful feature to enable conditions including cookies.
Switches ( https://www.drupal.org/project/switches β ) allows this behaviour but it looks like that module is not longer being maintained.
- πΊπΈUnited States djdevin Philadelphia
Arbitrary conditions on toggles in general would be great, like blocks, so certain toggles could be enabled on a list of paths, certain node type, query string parameter, etc.
- πΊπΈUnited States freelock Seattle
The cacheability comment here reminds me of the Access Policy API - https://www.drupal.org/docs/develop/drupal-apis/access-policy-api β -- the main point being if you can define a cache context as a policy, you can fully use the cache. And use it to define access.
And... this seems like a great thing to integrate (somehow -- I don't fully understand how this works) with feature toggles. For example, I want to roll out a new chat widget on an enterprise site, and they don't want it to go live until a particular date that's in the next fiscal year. Putting it behind a feature flag and rolling it out now makes it very quick to enable when they are ready -- but if we could "enable" the feature for a particular set of users, activated by a magic link or user role, this would allow for much more complete testing in the production environment before turning it on to the world...