- Issue created by @dpi
- ๐ฎ๐ณIndia annmarysruthy
I had a look at the different options, and hereโs what I think:
- Moving the permission into core/system would fix the dependency issue, but it might be confusing to have a block-related permission show up even when the Block module is turned off. That could lead to some questions about what it actually does.
- Adding a new permission, like view broken block messages, feels like the cleanest solution. It avoids relying on the Block module, keeps things clear, and makes it easy to control who can see these messages.
- Checking something else instead of permissions, like if the user is an admin, could also work. But using a permission is more flexibleโsite builders can decide exactly who should see the message.
So, Iโm thinking of going with the second option: adding a new permission in system.module and updating the Broken block plugin to use it.
Open to suggestions.
- Merge request !12145Issue #3524897: Dependency from core block plugin to block module โ (Closed) created by annmarysruthy
- ๐ฆ๐บAustralia dpi Perth, Australia
I personally would suggest against a new permission, especially with such a limited purpose.
Its bloaty and too theoretical at this point.
Another approach could be just like we have with twig debug service parameter. Then pass along that parameter as a part of plugin creation. That way it isnt tied to a specific user, and the broken message can never be displayed in a non development environment, and inversely is always present on a development environment.
Contrib or future changes could easily tie multiple parameters together under a "development parameter", which turns on the above proposed parameter plus twig parameter plus others...
- ๐ฌ๐งUnited Kingdom catch
Should this be postponed on โจ Add a Production/Development Toggle To Core Needs work ?
Could also see triggering E_USER_WARNING maybe, then it comes down to error reporting settings and permissions without the dependency.
- ๐ฆ๐บAustralia dpi Perth, Australia
@catch that issue looks like it could provide what we need.
Marking as postponed but anyone feel free to add other opinions.
- ๐ฆ๐บAustralia dpi Perth, Australia
Should this be under Base/Plugin systems instead of "Block.module" component?