#111328Decide page permissions with a security voter
Description
The page permissions of backend users are decided by BackendUserAuthentication only: the SQL clause of getPagePermsClause(), the webmount check of isInWebMount() and the permission bitmask of calcPerms(). Voters of the authorization checker (#111235) cannot use them without the user object, and new APIs such as a record read check have to pass the user object around.
Proposal
- An internal
PagePermissionEvaluatordecides page permissions for a context of the user, its groups and the mounts of the request. The three methods ofBackendUserAuthenticationdelegate to it. - A
PageVoterdecides onPageobjects for reading, updating, deleting, creating subpages and a new scope for changing the content of a page. - Webmounts and the workspace are no part of the principal. The backend stores them, together with the file mounts and storages (resolved on first access only), as mount context on the security token of the request.
- The hooks
getPagePermsClauseandcalcPermsare deprecated in favour of two PSR-14 events:ModifyPagePermissionClauseEvent: listeners build constraints with an expression builder instead of SQL stringsModifyPagePermissionsEvent: listeners grant or revoke permissions on a single page
The events apply to the voter and to the methods of BackendUserAuthentication alike, so that extensions such as access control lists keep working with both.
Reviews 2
History 012
-
Gerrit Code Review pushed patch set 1 for main to change 97322 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-03T14:43:24+00:00" > 11/03/26, 14:43 </span> -
Gerrit Code Review pushed patch set 2 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-09T10:13:06+00:00" > 11/09/26, 10:13 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-10T20:26:15+00:00" > 11/10/26, 20:26 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-13T14:31:23+00:00" > 11/13/26, 14:31 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-13T19:02:41+00:00" > 11/13/26, 19:02 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-13T20:59:44+00:00" > 11/13/26, 20:59 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-17T15:48:14+00:00" > 11/17/26, 15:48 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-17T18:50:54+00:00" > 11/17/26, 18:50 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-18T08:04:19+00:00" > 11/18/26, 08:04 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-18T10:35:53+00:00" > 11/18/26, 10:35 </span>
-
Gerrit Code Review pushed patch set 11 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-18T19:05:18+00:00" > 11/18/26, 19:05 </span>
-
Gerrit Code Review pushed patch set 12 for main to change 97322 <span data-processor="relativetime" data-value="2026-11-18T19:16:28+00:00" > 11/18/26, 19:16 </span>