Per role allowance?

Created on 7 April 2025, about 1 month ago

Thanks for this module!

My use case is that I'd like to block only anonymous "excessive facetting" I was wondering if having a per-role setting that would allow i.e. editors unlimited facets would make sense? happy to work on it if it does.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain pcambra Asturies

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @pcambra
  • πŸ‡ΊπŸ‡ΈUnited States bburg Washington D.C.

    Right now, we use a very early event listener, and try to minimize database reads to deal with the performance issue if these faceted pages being bombarded with requests. So I'll have to think about what can be done here. We could certainly look for the SSESS cookie, allow a bypass of the initial block, and do another proper role/permission check once Drupal is more bootstrapped. I'm definitely open to this feature.

  • πŸ‡ΊπŸ‡ΈUnited States bburg Washington D.C.

    I just made a push to the 1.0.x branch that adds a permission to bypass the block altogether. We can look at separate values per role in the future.

  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    People can assign that permission to whatever role they want, so i think this fulfills the initial request. (I would even say that doing things with a role setting directly rather than through permissions is an anti-pattern.)

    And this would seem to fulfill this feature request to Facets: ✨ Permissions-based limit on the number of facets a user can select Active

    Really exciting!

Production build 0.71.5 2024