Class AclHelper
java.lang.Object
com.illumon.iris.db.v2.permissions.AclHelper
public final class AclHelper extends Object
This purely static class centralizes the logic around table row/column ACL application.
-
Constructor Summary
Constructors Constructor Description AclHelper()
-
Method Summary
Modifier and Type Method Description static Table
applyAcls(com.fishlib.auth.UserContext userContext, Table table, String name, IrisGroupProvider groupProvider, String owner, Supplier<String[]> adminGroupSupplier)
Apply both Row and Column ACLs to the specified table.static boolean
hasTableAcls(Table table)
Check if the specified table has ACLs at the table level.
-
Constructor Details
-
AclHelper
public AclHelper()
-
-
Method Details
-
hasTableAcls
Check if the specified table has ACLs at the table level.- Parameters:
table
- the table to check for ACLs- Returns:
- if the table has ACLs
-
applyAcls
public static Table applyAcls(com.fishlib.auth.UserContext userContext, Table table, String name, IrisGroupProvider groupProvider, String owner, Supplier<String[]> adminGroupSupplier) throws TableAccessExceptionApply both Row and Column ACLs to the specified table.- Parameters:
userContext
- the user trying to access the tabletable
- the tablename
- the name of the table (if any)groupProvider
- the source of group informationowner
- the owner of the sourceadminGroupSupplier
- a supplier to find admin groups- Returns:
- the table with ACLs applied, or the original table if there were no ACLs.
- Throws:
TableAccessException
- if the user may not access the table.
-