- Issue created by @solideogloria
- π»π³Vietnam tra.duong
The permission for "View published content" is belong to "system" module (yes, the "system" is also a module).
1. Go to /admin/people/permissions,
The permission in this page is changed on purposed
When access:
"core/modules/user/src/Form/UserPermissionsForm.php::permissionsByProvider()"
You will see// Move the access content permission to the Node module if it is installed. // @todo Add an alter so that this section can be moved to the Node module. if ($this->moduleHandler->moduleExists('node')) { // Insert 'access content' before the 'view own unpublished content' key
After have a check, there is a glitch of "core/modules/views/src/Plugin/views/display/DisplayPluginBase.php::buildOptionsForm()"
It does not replace/move the 'access content' permission from "system" to "node" like it does on permission page.That's my checks.
- π³π±Netherlands Lendude Amsterdam
Nice digging @tra.duong , thanks!
To me this isn't a bug in Views. Views is displaying the correct information. As pointed out by the comment on UserPermissionsForm.php::permissionsByProvider(), the altering should be done by the node module and then it would be the same everywhere. But currently we lack the correct alters to be able to to that, see #763074: Add hook_permission_alter() so that permission descriptions and other properties can be altered β
So if we care about getting this consistent between Views and the permissions matrix (but still inconsistent should this be listed anywhere else) we would need to duplicate the logic from
UserPermissionsForm.php::permissionsByProvider
to\Drupal\user\Plugin\views\access\Permission::buildOptionsForm
. Since the logic is contained in a protected function on that form, we can't reuse it either Β―\_(γ)_/Β―