jerryshao commented on code in PR #5682:
URL: https://github.com/apache/gravitino/pull/5682#discussion_r1891667140
##########
core/src/main/java/org/apache/gravitino/catalog/CredentialManager.java:
##########
@@ -38,16 +39,19 @@ public CredentialManager(
}
public List<Credential> getCredentials(NameIdentifier identifier) {
+ CredentialPrivilege privilege =
+ getCredentialPrivilege(PrincipalUtils.getCurrentUserName(),
identifier);
return doWithCatalog(
NameIdentifierUtil.getCatalogIdentifier(identifier),
- c -> getCredentials(c.catalog(), identifier),
+ catalogWrapper ->
+ catalogWrapper.doWithCredentialOps(
+ credentialOps -> credentialOps.getCredentials(identifier,
privilege)),
NoSuchCatalogException.class);
}
- private List<Credential> getCredentials(BaseCatalog catalog, NameIdentifier
identifier) {
- throw new NotImplementedException(
- String.format(
- "Load credentials is not implemented for catalog: %s, identifier:
%s",
- catalog.name(), identifier));
+ @SuppressWarnings("UnusedVariable")
+ private CredentialPrivilege getCredentialPrivilege(String user,
NameIdentifier identifier)
+ throws NotAuthorizedException {
+ return CredentialPrivilege.WRITE;
Review Comment:
Why do we return write privilege here?
--
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]