Skip to content

Commit 36309bc

Browse files
DucNgoQuangdeepgarg760
authored andcommitted
refactor(policy): Update policy check for get invite token and create invite token (#14941)
Co-authored-by: Deepak Garg <[email protected]>
1 parent f06e201 commit 36309bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/role/CreateInviteTokenResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class CreateInviteTokenResolver implements DataFetcher<CompletableFuture<
2525
public CompletableFuture<InviteToken> get(final DataFetchingEnvironment environment)
2626
throws Exception {
2727
final QueryContext context = environment.getContext();
28-
if (!canManagePolicies(context)) {
28+
if (!canManageUserCredentials(context)) {
2929
throw new AuthorizationException(
3030
"Unauthorized to create invite tokens. Please contact your DataHub administrator if this needs corrective action.");
3131
}

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/role/GetInviteTokenResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class GetInviteTokenResolver implements DataFetcher<CompletableFuture<Inv
2525
public CompletableFuture<InviteToken> get(final DataFetchingEnvironment environment)
2626
throws Exception {
2727
final QueryContext context = environment.getContext();
28-
if (!canManagePolicies(context)) {
28+
if (!canManageUserCredentials(context)) {
2929
throw new AuthorizationException(
3030
"Unauthorized to get invite tokens. Please contact your DataHub administrator if this needs corrective action.");
3131
}

0 commit comments

Comments
 (0)