Stale Edit tab after membership changes
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3571426. --> Reported by: [amitaibu](https://www.drupal.org/user/57511) Related to !68 >>> <p>When a user&rsquo;s membership in an OG group changes, the Edit tab on group content nodes can remain stale (e.g., still hidden after adding a member, or still shown after removal) until cache is<br> cleared. This appears to be caused by OG access results not carrying cacheability metadata through hook_entity_access() denial paths, and by access results not varying by OG permissions.</p> <h2>Steps to reproduce</h2> <p> 1. Create a group content type (e.g., Article) and a group type (e.g., Department).<br> 2. Configure OG permissions so group members have &ldquo;Edit any article content&rdquo;.<br> 3. View an Article as a non&#8209;member: no Edit tab.<br> 4. Add membership for the same user to the group (active).<br> 5. Refresh the Article page.</p> <h2> Expected result<br> </h2> <p>The Edit tab appears immediately after membership is added (and disappears immediately after removal).</p> <h2> Actual result<br> </h2> <p>The Edit tab remains in the prior state until caches are cleared.</p>
issue