Problem/Motivation
The \Drupal\node\Form\RebuildPermissionsForm is accessible to any user with the access administration pages permission. Rebuilding permissions can be a long and very disruptive process for sites with lots of content access permissions and should be restricted to a higher level of permission.
In fact, the final step of the rebuild process redirects the user to /admin/reports/status which requires the administer site configuration so for certain configurations the user will be redirected to a 403 Access Denied message after the rebuild completes.
Steps to reproduce
- Flag permissions for rebuild.
- Log in as a user with the
access administration pagepermission but not theadminister site configurationpermission. - Observe a notification about rebuilding permissions and click the link to do so.
- Rebuild the permissions.
- Observe a 403 Access Denied response on completion.
Proposed resolution
Use the administer nodes permissions for access control to the rebuild form and operation.
This means the user could still end up with a 403 Access Denied without the additional administer site configuration permission but administer site configuration feels like it does not fit quite as well for the rebuild permission.
Remaining tasks
Create a branch with the propose change.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
Rebuilding permissions now requires the administer nodes permission. Previously only the access administration pages permission was required. Site owners should review and adjust permissions as necessary to ensure proper access to the rebuild permissions functionality.
Issue fork drupal-3318992
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
wellsMR!2925 opened with the proposed resolution.
Comment #4
wellsReverting issue title -- not sure why it changed...
Comment #5
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge require as a guide.
Tried following the steps in the summary but when I go to admin/reports/status the rebuild happens so quick I don't see anything on my other browser.
But believe this kind of change will need subsystem maintainer reviewer and a change record.
Comment #6
larowlanThis makes sense to me, but because of the disruption would only happen in a minor release.
And because of that we need a release not snippet that advises site-owners of the permission change.
Comment #7
wellsComment #8
wellsI have rebased the MR and drafted a release note snippet and change record. Returning to NR for those changes.
Comment #9
smustgrave commentedTook a look at the CR and release notes and they seem clear to me.
Comment #12
catchCommitted e6793ca and pushed to 11.x. Thanks!