Event "Views Access" doesn't work with Action "Set access result"

Created on 1 August 2025, 23 days ago

Problem/Motivation

I'm trying to set custom access to a view via ECA, but even if I set Access result: allowed in my model, I always get an access denied.

Steps to reproduce

- Make a view page with an url path
- In the view under "Page settings" -> "Access" choose the option "ECA"
- Created a model with the Event "Views: Access" and select the view in the plugin.
- Add the Action "Set access result" and set the access result to "allowed"
- Connect the Event and Action and save the model
- Open the view under the chosen path
--> The view will give back an "Access denied"

The Event and Action are from different submodlues (ECA Views and ECA Access), and the Action does state that it only works with ECA Access Events. However, there are no other Actions I could use after the Event "Views Access" to set an access result.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

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

Comments & Activities

  • Issue created by @tkasecker
  • 🇩🇪Germany jurgenhaas Gottmadingen
    • jurgenhaas committed ce015aa8 on 3.0.x
      Issue #3539222 by tkasecker, jurgenhaas: Event "Views Access" doesn't...
    • jurgenhaas committed 7ea32213 on 2.1.x
      Issue #3539222 by tkasecker, jurgenhaas: Event "Views Access" doesn't...
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thank you @tkasecker for reporting this. As stated on Slack before, the "Set access result" action is the correct one. I've now fixed the access control as well, please give the dev release (either 2.1.x or 3.0.x) a try.

  • @jurgenhaas Thank you for your quick fix. I tested on dev release 2.1.x and the action now correctly sets the access result for the views access.

    Since the Event "View access" is part of the submodule Views, but requires an action from the submodule Access so it can be properly used, maybe it makes sense to move the Event to the Access module? So everything that has to do with manipulating access can be found in one submodule. I think that would make more sense logically if you're looking for Events/Actions to manipulate access via ECA, but that's for you to decide.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Yeah, I thought about that before as well. The problem is, that the view access event extends the ViewsBase event which is part of eca_views and can't be moved. So, you would still require the eca_views module as well.

    So, if we want to control views access, we need both, eca_views and eca_access.

  • 🇩🇪Germany jurgenhaas Gottmadingen
Production build 0.71.5 2024