Skip to content

Conversation

@david-leifker
Copy link
Collaborator

Remove Authorization Check from listUsers GraphQL Resolver

Summary

This PR removes the authorization check from the listUsers GraphQL resolver, allowing all users to access the listUsers operation without requiring MANAGE privileges on CORP_USER and CORP_GROUP entities.

Changes

Removed Authorization Check

  • File: datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/user/ListUsersResolver.java
    • Removed AuthorizationUtils.canManageUsersAndGroups(context) check that was blocking access
    • Removed unused imports: AuthorizationUtils and AuthorizationException
    • The resolver now executes the user listing logic directly without authorization gates

Impact

  • Before: Users without MANAGE privileges on CORP_USER and CORP_GROUP entities would receive an AuthorizationException when calling listUsers
  • After: All authenticated users can now call listUsers without authorization restrictions

Related Context

This change aligns with the broader authorization strategy where entity-level access controls are enforced at the data layer (e.g., through EntityService and OperationContext) rather than at the GraphQL resolver level for user listing operations.

Manage is not required for listUsers
@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Nov 28, 2025

✅ Meticulous spotted 0 visual differences across 992 screens tested: view results.

Meticulous evaluated ~8 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit 9aa59c9. This comment will update as new commits are pushed.

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Nov 28, 2025
@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Nov 29, 2025
@david-leifker david-leifker merged commit 9fceb38 into master Nov 29, 2025
52 checks passed
@david-leifker david-leifker deleted the fix-graphql-read-access branch November 29, 2025 17:07
Tim-Visser pushed a commit to Tim-Visser/datahub that referenced this pull request Dec 1, 2025
yonglingsong pushed a commit to yonglingsong/datahub that referenced this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-merge product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants