Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm developing a D8 site. I am using a custom views plugin to query data from a remote api by searching a business ID.
My scenario: User is only allowed to enter input of 3 attempts of business ID in a search view. If 3 attempts fails, I want to hide the views UI from the page for 24 hours. What's my purpose? To give difficulty for others to guess my business ID.
I wasn't able to implement it using Rules, and I'm guessing if we can do it on front-end coding.
Does anyone have an idea to implement this? Thanks!
Comments
Comment #2
LendudeMoving to the core Views queue.
Frontend code won't help because anybody can just disable it client side and work around your 'security'.
Backend you could write a custom Views access handler (extend \Drupal\views\Plugin\views\access\AccessPluginBase and add your logic to that) and use that on your View.
Hope that helps.