fix(graphql): listUsers resolver incorrect access check #15448
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove Authorization Check from listUsers GraphQL Resolver
Summary
This PR removes the authorization check from the
listUsersGraphQL resolver, allowing all users to access thelistUsersoperation without requiringMANAGEprivileges onCORP_USERandCORP_GROUPentities.Changes
Removed Authorization Check
datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/user/ListUsersResolver.javaAuthorizationUtils.canManageUsersAndGroups(context)check that was blocking accessAuthorizationUtilsandAuthorizationExceptionImpact
MANAGEprivileges onCORP_USERandCORP_GROUPentities would receive anAuthorizationExceptionwhen callinglistUserslistUserswithout authorization restrictionsRelated Context
This change aligns with the broader authorization strategy where entity-level access controls are enforced at the data layer (e.g., through
EntityServiceandOperationContext) rather than at the GraphQL resolver level for user listing operations.