Skip to content

Conversation

AndyButland
Copy link
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

Addresses: #20097

Description

Although I haven't been able to replicate the reported issue, I can see the proposed solution is sensible, as it allows us to by-pass complex logic for verifying document specific permissions, when we aren't working with a document.

So I've applied that here.

Testing

To verify, use a set up such as:

  • Create a user in only the "Editors" group
  • Add a document specific permission to a document that removes some permissions that the editor normally has.
  • Verify when expanding the entity actions menu that the default editor permissions appear on documents without the document specific permission, but that the restricted set appears on those that have it defined
  • Verify that default editor permissions appear on all entity action lists that aren't based on documents (e.g. media, members, dictionary).

@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 06:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where document-specific permissions were being checked for all entity types, not just documents. The fix ensures that complex document permission logic is only executed when the entity type is actually a document.

Key Changes

  • Added entity type check before evaluating document permissions
  • Simplified the code structure by removing an unnecessary conditional block
  • Fixed comment capitalization for consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant