Closed (won't fix)
Project:
Content Access
Version:
2.1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Jul 2024 at 19:47 UTC
Updated:
13 Apr 2026 at 12:00 UTC
Jump to comment: Most recent
Comments
Comment #2
averagejoe3000Comment #4
steven jones commented@averagejoe3000 thanks for the work here.
I suppose that we should add a test to ensure that we don't show the message to someone who can edit the settings, but not rebuild the access permissions.
Comment #5
joao.ramos.costa commentedHi !
IMO the availability of this messages — considering that in my experience, access to these forms is usually granted to users with elevated permissions — could be something configurable within the module itself, WDYT ?
Thank you!
Comment #7
quadrexdevAdded test coverage and used ->access($current_user) to check access, instead of a permission check.
Please review.
Comment #8
alt36 commentedI think a better approach for both this issue and the underlying original issue #3357181: Does not react to role changes is to just call node_access_needs_rebuild(TRUE) rather than showing a message via content_access_user_update().
Taking this approach would also mean the test cases added in MR !14 should just check e.g.
$this->assertTrue(\Drupal::state()->get('node.node_access_needs_rebuild'), 'Node access permissions need to be rebuilt');(following NodeAccessRebuildNodeGrantsTest.php in the core node module)Comment #9
quadrexdevComment #10
quadrexdevComment #11
quadrexdev@alt36 I agree, it makes more sense, and this way we're relying on the core behavior without re-inventing the same thing in our module.
Merged in 2.1.x
Comment #14
steven jones commentedI'm suggested that we revert the changes introduced in this issue over here:
#3574984-14: 2.1.0-rc2 keeps asking to rebuild permissions
Because these changes call
node_access_needs_rebuild(TRUE);a lot of the time when they don't need to.I'm going to raise a new issue about how to do the content auth grant realm properly, and then that'll mean that we can safely remove the messaging that this ticket was originally about.
Comment #15
steven jones commentedComment #17
steven jones commentedOver in #3579507: Re-work the author grant realms I've got a different implementation that doesn't need to recompute the node access records any time a user's roles change.
It should be considered experimental I think, but if anyone wanted to test that out on a dev site and let me know if it works for them that would be much appreciated. I've added tests for the functionality that's changing, but you never know eh?
Comment #18
steven jones commentedI'm going to go ahead and mark this issue as 'won't fix' since the proper fix is coming in 3.x / #3579507: Re-work the author grant realms. We're just going to go around in circles trying to do something a bit silly if we try to resolve this message being shown incorrectly etc. The correct way forward is to get the records/grants done right, so that we don't need a message at all, because the system works.
Thanks for your help on this issue everyone, and feel free to pitch in on #3579507: Re-work the author grant realms.