yuqi1129 commented on code in PR #9534:
URL: https://github.com/apache/gravitino/pull/9534#discussion_r2644997768
##########
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:
So we only have two types of permission: `read` and `write`, and it will be
absolutely `read` if it's not write?
--
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]