You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/01/14 05:17:57 UTC

[GitHub] [incubator-pinot] kishoreg commented on a change in pull request #6440: Add authentication for write endpoints of Controller resources

kishoreg commented on a change in pull request #6440:
URL: https://github.com/apache/incubator-pinot/pull/6440#discussion_r557049026



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/access/AccessControl.java
##########
@@ -35,4 +35,25 @@
    * @return Whether the client has data access to the table
    */
   boolean hasDataAccess(HttpHeaders httpHeaders, String tableName);
+
+  /**
+   * Return whether the client has write permission to the given table
+   *
+   * @param httpHeaders http headers
+   * @param tableName name of the table to be accessed
+   * @return whether the client has write permission
+   */
+  default boolean hasWritePermission(HttpHeaders httpHeaders, String tableName) {

Review comment:
       can we do hasAccess(AccessType, HttpHeaders httpHeaders, String tableName) this will be more flexible and we can add more types later without having to change the interface




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org