Active
Project:
Drupal core
Version:
main
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2026 at 17:05 UTC
Updated:
2 Mar 2026 at 17:05 UTC
Jump to comment: Most recent
If permissions need to be calculated for an account other than the current user, AccessPolicyProcessor::processAccessPolicies() has to switch the current user to that account in order to calculate and cache the data correctly.
The account switching led to problems with fibers as seen in #3576074: Current user is changed unexpectedly. While a workaround was implemented there, ideally switching the current user should not need to be done at all. This should be possible once #2628870: Access result caching per user(.permissions) does not check for correct user is done, so that issue is a blocker here.
Comments