Fix access cacheability

Created on 3 August 2024, 5 months ago
Updated 9 September 2024, 3 months ago

Problem/Motivation

Working on πŸ“Œ Add a host access handler Needs review I noticed a number of what appear to be bugs in access cacheability metadata.

1. The adminster and manage 'own' permissions don't need to be cached per user, as they don't depend on the entity owner in the conventional Drupal sense; it's enough that they incorporate the cacheable metadata of their check on update access on the host.

2. When looking at registration permissions based on 'own host' the cacheable metadata of the host entity update operation matters even if it does not give permission, because it might have.

3. If the host entity update check returns a forbidden result, that shouldn't turn our result into a forbidden.

4. If a simple permission doesn't allow access to a registration, and the user is not the registrant, we still have to cache per user because the user might have been the registrant.

5. Registration access depends on the host entity specified on the registration, but that requires a cacheable dependency on the registration not on the host entity.

Proposed resolution

It's probably simpler to discuss and fix these seperately rather than introduce more moving parts into πŸ“Œ Add a host access handler Needs review .

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.3

Component

Registration Core

Created by

πŸ‡¬πŸ‡§United Kingdom jonathanshaw Stroud, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024