flyrain commented on code in PR #3724:
URL: https://github.com/apache/polaris/pull/3724#discussion_r2800354538


##########
polaris-core/src/main/java/org/apache/polaris/core/auth/PolarisAuthorizableOperation.java:
##########
@@ -144,7 +145,7 @@ public enum PolarisAuthorizableOperation {
   DROP_VIEW(VIEW_DROP),
   VIEW_EXISTS(VIEW_LIST),
   RENAME_VIEW(VIEW_DROP, EnumSet.of(VIEW_LIST, VIEW_CREATE)),
-  REPORT_METRICS(EnumSet.noneOf(PolarisPrivilege.class)),
+  REPORT_METRICS(TABLE_REPORT_METRICS),

Review Comment:
   Write privilege may be too restrictive as that major use cases of a scan 
report(https://github.com/apache/polaris/blob/849039371b59c9ffba088f6ba6a0fffb6d9f58fc/spec/iceberg-rest-catalog-open-api.yaml#L3788)
 metrics happen when engines read a table.
   
   But I agreed that the `CommitReport` needs the write privilege. 
   
https://github.com/apache/polaris/blob/849039371b59c9ffba088f6ba6a0fffb6d9f58fc/spec/iceberg-rest-catalog-open-api.yaml#L3823
   
   We may have to distinguish them. 



-- 
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]

Reply via email to