abhishekbafna commented on code in PR #16043:
URL: https://github.com/apache/pinot/pull/16043#discussion_r2139257739


##########
pinot-core/src/main/java/org/apache/pinot/core/auth/BasicAuthPrincipal.java:
##########
@@ -65,13 +72,27 @@ public boolean hasPermission(String permission) {
     return _permissions.isEmpty() || 
_permissions.contains(permission.toLowerCase());
   }
 
+  /**
+   * Gets the Row-Level Security (RLS) filter configured for the given table.
+   * The RLS filter is applied only if the user has access to the table
+   * (as determined by {@link #hasTable(String)}).
+   *
+   * @param tableName The name of the table.
+   * @return An {@link java.util.Optional} containing the RLS filter string if 
configured for this principal and table,
+   * otherwise {@link java.util.Optional#empty()}.
+   */
+  public Optional<Map<String, List<String>>> getRLSFilters(String tableName) {
+    return Optional.ofNullable(_rlsFilters.get(tableName));
+  }
+
   @Override
   public String toString() {
     return "BasicAuthPrincipal{"
         + "_name='" + _name + '\''
         + ", _token='" + _token + '\''
         + ", _tables=" + _tables

Review Comment:
   Add the separator ('\') for tables 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: commits-unsubscr...@pinot.apache.org

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

Reply via email to