roryqi commented on code in PR #9785:
URL: https://github.com/apache/gravitino/pull/9785#discussion_r2787779906
##########
server/src/main/java/org/apache/gravitino/server/web/rest/CatalogOperations.java:
##########
@@ -268,7 +296,29 @@ public Response loadCatalog(
try {
NameIdentifier ident = NameIdentifierUtil.ofCatalog(metalakeName,
catalogName);
Catalog catalog = catalogDispatcher.loadCatalog(ident);
- Response response = Utils.ok(new
CatalogResponse(DTOConverters.toDTO(catalog)));
+ CatalogDTO catalogDTO;
+ if (filterSensitiveProperties) {
+ // Only allow users with alter permission to access sensitive data in
catalog properties.
+ boolean enableAccessSensitiveData =
+ MetadataAuthzHelper.checkAccess(
+ ident,
+ Entity.EntityType.CATALOG,
+ AuthorizationExpressionConstants.CATALOG_OWNER_EXPRESSION);
Review Comment:
Actually, only owners have the alter permission. If we add the new privilege
to alter the catalog. They should see the all the properties, too.
--
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]