sajjad-moradi commented on a change in pull request #6440: URL: https://github.com/apache/incubator-pinot/pull/6440#discussion_r564806601
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/access/AccessControl.java ########## @@ -30,9 +30,35 @@ /** * Return whether the client has data access to the given table. * + * Note: This method is only used for read access. It will be deprecated soon and its usage will be replaced by + * `hasAccess` method with AccessType.READ. + * * @param httpHeaders Http headers * @param tableName Name of the table to be accessed * @return Whether the client has data access to the table */ boolean hasDataAccess(HttpHeaders httpHeaders, String tableName); + + /** + * Return whether the client has permission to the given table + * + * @param accessType access type + * @param httpHeaders HTTP headers + * @param tableName Name of the table to be accessed + * @return whether the client has permission + */ + default boolean hasAccess(AccessType accessType, HttpHeaders httpHeaders, String tableName) { + return true; + } + + /** + * Return whether the client has permission to access the endpoints which are not table level Review comment: Sounds reasonable. Also adding the endpoint name will probably be helpful as it can be logged in AccessControl implementation. @kishoreg since you originally proposed to use AccessType, what do you think of Subbu's suggestion? ########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/access/AccessControl.java ########## @@ -30,9 +30,35 @@ /** * Return whether the client has data access to the given table. * + * Note: This method is only used for read access. It will be deprecated soon and its usage will be replaced by Review comment: Will do. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org