Problem/Motivation

Getting the message about rebuild after saving changes to access control for a single node. Is this ever true? The ContentAccessPageForm displays this message for all saves. Are there are any cases where a single node access update requires a full rebuild? Maybe this message is in the wrong file?

Steps to reproduce

Enable "per-node" access control for a given content type. Edit a node of that type, use the Access Control tab to change the settings from the default for the content type, and save the node access change. Receive the message "Your changes have been saved. You may have to rebuild permisions for your changes to take effect." (note typo in spelling of permissions)

Proposed resolution

Remove this message if it is indeed spurious. Or move it to the ContentAccessAdminSettingsForm file.

Command icon 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

john.oltman created an issue. See original summary.

john.oltman’s picture

Issue summary: View changes
john.oltman’s picture

Issue summary: View changes
john.oltman’s picture

Issue summary: View changes
gisle’s picture

Category: Support request » Plan
Priority: Normal » Minor
Status: Active » Postponed

I can see that this is annoying.

However, looking at the module's history I can see that some of these were inserted out of desperation when some maintainer tried to get to grips with various "inexplicable" security issues affecting the module. Notice that is just a suggestion. It says "You may have to rebuild permissions for your changes to take effect", and not "You must rebuild permissions for your changes to take effect".

However, debugging the Content Access module is more time consuming than my schedule permits. I signed on to maintain this in order to get in a usable state, not to fix every flaw, and this is fairly cosmetic. Feel free to ignore the suggestion.

If anyone of this project's users can come up with a plan for how to QA a solution to this issue, including a well-designed test suite that convincingly makes the case for the removal of some or all of these, I'll make sure that the changes are committed. However. I cannot find the time to work on this myself.

Postponing for now. Feel free to assign yourself to have a crack at solving this.

gisle’s picture

I've fixed the spelling of "permissions".

gisle’s picture

Version: 8.x-1.0-alpha3 » 2.0.x-dev

This should go into the the most recent branch.

drupgirl’s picture

This message is quite confusing for end users. It's a "success" message that reads/acts like a failure. Imo the simplest solution is to send this message to the system log and remove the message from the user.

gisle’s picture

It has been a lot of water under the river since I wrote comment #5 (in 2020), and it turns out that not rebuilding permissions when it is required may in certain situations constitute a security vulnerability. See the related issue #3357181: Does not react to role changes for background.

It would be much better if somebody could find some time to drill down into this, identify the situations were rebuilding permissions are required, and identify those when it is not. However, until somebody does this (see suggestions for how to proceed in comment #5), these messages stay in the user interface.

alienzed’s picture

You'd think that, instead of displaying this message to end users who cannot do anything about it, that a Rebuild Permissions would just be triggered, period. No?

gisle’s picture

Yes. An MR/patch that does trigger rebuild permissions in the right context shall be welcome.

steven jones’s picture

Version: 2.0.x-dev » 3.0.x-dev

Moving to 3.0.x.

Now that we've sorted out the author realm/grants in #3579507: Re-work the author grant realms I suspect that we can remove the 'may' from here.

If you're saving an individual node's settings, then that should be sorted.

Otherwise, if you're saving a node types settings then I think we should flag for a rebuild, and remove our own implementation tbh.
But that's probably another ticket.