Skip to content

Honor group-derived roles in unprivileged tool access check#22623

Open
mvdbeek wants to merge 1 commit intogalaxyproject:devfrom
mvdbeek:fix-user-tool-access-groups
Open

Honor group-derived roles in unprivileged tool access check#22623
mvdbeek wants to merge 1 commit intogalaxyproject:devfrom
mvdbeek:fix-user-tool-access-groups

Conversation

@mvdbeek
Copy link
Copy Markdown
Member

@mvdbeek mvdbeek commented May 2, 2026

DynamicToolManager.ensure_can_use_unprivileged_tool only joined UserRoleAssociation directly, so users granted USER_TOOL_EXECUTE via group membership were denied access. Delegate to User.all_roles(), the project-wide single source of truth for "every role this user has, direct or via groups", instead of maintaining a parallel SQL query that already drifted.

Also adds an api regression test exercising the group-inherited path.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

DynamicToolManager.ensure_can_use_unprivileged_tool only joined
UserRoleAssociation directly, so users granted USER_TOOL_EXECUTE via
group membership were denied access. Delegate to User.all_roles(), the
project-wide single source of truth for "every role this user has,
direct or via groups", instead of maintaining a parallel SQL query that
already drifted.

Also adds an api regression test exercising the group-inherited path.
@mvdbeek mvdbeek force-pushed the fix-user-tool-access-groups branch from 00c3b9c to 5080ecd Compare May 2, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

1 participant