- Issue created by @Anybody
- Issue was unassigned.
- Status changed to Closed: works as designed
over 1 year ago 10:59am 2 June 2023 - 🇩🇪Germany Anybody Porta Westfalica
Sorry, I guess I was wrong and the behavior comes from a bugfix combined with a bug somewhere else (presumably access checking on tags). Other nodes with other tags work as expected. So this seems to be correct after upgrading to 2.0.2. I'll reopen if I'm wrong in this comment.
- Status changed to Active
over 1 year ago 11:04am 2 June 2023 - Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
Super strange, even switching to fallback "allowed" with no roles selected leads to "Access denied"!
I'm wondering, why no tests show this or if it's specific to my case... @Grevil please test this manually first. And ask me for a demo.
- Assigned to Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Found the reason, as it seems. It's a bug:
in the .module file:
if (empty($roles) || empty($accessStatus)) {
while
$roles
is expected to be empty, with no roles selected, it contains:[""]=> NULL
which is never empty!
That leads to this bug.I'll fix it, but we need to have the tests that fail with 2.0.2 for this. Then we would have noticed this bug.
- last update
over 1 year ago 27 pass - @anybody opened merge request.
- last update
over 1 year ago 27 pass - 🇩🇪Germany Anybody Porta Westfalica
Okay, this hotfix works, but
$roles
should never have these values, I guess?I'll merge this and tag a new release as quickfix.
I'll leave this open for @Grevil to create a follow-up issue for the following improvements:
- Add tests to test the described permission issue (failing with 2.0.2, working with 2.0.3)
- Fix the root cause, if needed so that
[""]=> NULL
doesn't ever exist (if it doesn't make sense)
Feel free to contact me for details @Grevil
- Assigned to Grevil
- 🇩🇪Germany Grevil
Follow up created in 🐛 [Follow-up] Selecting no roles and falling back to neutral leads to access denied on nodes Needs review .
- Status changed to Fixed
over 1 year ago 8:51am 6 June 2023 - Issue was unassigned.
Automatically closed - issue fixed for 2 weeks with no activity.