Skip to content

Conversation

@DiegoPino
Copy link
Member

@DiegoPino DiegoPino commented Jan 12, 2026

This is one way of solving it, AMI set entities cache should not vary only by "Role" bc the fact that we have "some operation on own AMI set" permissions makes same role -> different behavior based on who sees the Object. That works well on the actual "access" but as explained in the comments of this hook leads to disappearing tabs (not the actual permission/access to the route) when two users sharing the same Role access one of those users owned AMI set. Another way would be to return even the "neutral" access responses (so the case when the not owner access it) with the "user" context ... will test tomorrow what the effect of that is. Weird is no core/contributed entity does that. @alliomeria i will need to evaluate if this also happens with Metadata Display entities on format strawberry field.

Caching here is really not a performance issue. One will never have 1 million AMI sets, nor 1 million Twig templates ... also this really looks like a Drupal 10.2++ or 10.3++ change, we never had that before and we are not the only ones reporting stuck Menu tasks (I even think we saw 2025 something like that, a "weird" edit button in one of our partners NODES @alliomeria ? maybe an IR repo?)

…t (on entity view/rendered page) is not varying by user

This is one way of solving it, AMI set entities cache should not vary by "Role" bc the fact that we have "operation own AMI set" permissions makes same role -> different behavior based on how sees the Object. That works well on the actual "access" but as explained in the comments of this hook leads to diss-appearing tabs (not the actual permission/access to the route) when two users sharing the same Role access one of those users owned AMI set.
Another way would be to return even the neutral access responses (so the case when the not owner access it) with the "user" context ... will test tomorrow what the effect of that is. @alliomeria i will need to evaluate if this also happens with Metadata Display entities
@DiegoPino DiegoPino self-assigned this Jan 12, 2026
@DiegoPino DiegoPino added External Bug It is not my fault (anonymous Geologist) AMI entity Drupal 11 labels Jan 12, 2026
@alliomeria
Copy link
Contributor

This is newer to me too, @DiegoPino, probably because most of the time I'm always logged in as an/the admin role. The double/stuck 'Edit' button was in an IR partner, yes--and thinking back, it was only happening for a user with a non-admin role type.

@DiegoPino
Copy link
Member Author

@alliomeria thank you. Will ask you more tomorrow about that previous issue. Appreciate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AMI entity Drupal 11 External Bug It is not my fault (anonymous Geologist)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants