jerqi commented on code in PR #9534:
URL: https://github.com/apache/gravitino/pull/9534#discussion_r2644714447
##########
server/src/main/java/org/apache/gravitino/server/web/rest/MetadataObjectCredentialOperations.java:
##########
@@ -114,7 +116,16 @@ public Response getCredentials(
CallerContext.CallerContextHolder.set(context);
LOG.info("Set the caller context for getting credential: {}",
context.context());
}
- List<Credential> credentials =
credentialOperationDispatcher.getCredentials(identifier);
+
+ CredentialPrivilege privilege =
+ MetadataAuthzHelper.checkAccess(
+ identifier,
+ MetadataObjectUtil.toEntityType(object),
+
AuthorizationExpressionConstants.filterWriteFilesetAuthorizationExpression)
+ ? CredentialPrivilege.WRITE
+ : CredentialPrivilege.READ;
Review Comment:
You don't have the whole picture. For catalog object, it can have
write_fileset or read_fileset privileges, too. If we don't need this modication.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]