Package io.trino.plugin.base.security
Class CatalogTableAccessControlRule
- java.lang.Object
-
- io.trino.plugin.base.security.CatalogTableAccessControlRule
-
public class CatalogTableAccessControlRule extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static CatalogTableAccessControlRuleALLOW_ALL
-
Constructor Summary
Constructors Constructor Description CatalogTableAccessControlRule(TableAccessControlRule tableAccessControlRule, Optional<Pattern> catalogRegex)CatalogTableAccessControlRule(Set<TableAccessControlRule.TablePrivilege> privileges, Optional<List<ColumnConstraint>> columns, Optional<String> filter, Optional<ExpressionEnvironment> filterEnvironment, Optional<Pattern> userRegex, Optional<Pattern> roleRegex, Optional<Pattern> groupRegex, Optional<Pattern> schemaRegex, Optional<Pattern> tableRegex, Optional<Pattern> catalogRegex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanSelectColumns(Set<String> columnNames)Optional<ViewExpression>getColumnMask(String user, String catalog, String schema, String column)Optional<ViewExpression>getFilter(String user, String catalog, String schema)Set<TableAccessControlRule.TablePrivilege>getPrivileges()Set<String>getRestrictedColumns()booleanmatches(String user, Set<String> roles, Set<String> groups, CatalogSchemaTableName table)
-
-
-
Field Detail
-
ALLOW_ALL
public static final CatalogTableAccessControlRule ALLOW_ALL
-
-
Constructor Detail
-
CatalogTableAccessControlRule
public CatalogTableAccessControlRule(Set<TableAccessControlRule.TablePrivilege> privileges, Optional<List<ColumnConstraint>> columns, Optional<String> filter, Optional<ExpressionEnvironment> filterEnvironment, Optional<Pattern> userRegex, Optional<Pattern> roleRegex, Optional<Pattern> groupRegex, Optional<Pattern> schemaRegex, Optional<Pattern> tableRegex, Optional<Pattern> catalogRegex)
-
CatalogTableAccessControlRule
public CatalogTableAccessControlRule(TableAccessControlRule tableAccessControlRule, Optional<Pattern> catalogRegex)
-
-
Method Detail
-
matches
public boolean matches(String user, Set<String> roles, Set<String> groups, CatalogSchemaTableName table)
-
getPrivileges
public Set<TableAccessControlRule.TablePrivilege> getPrivileges()
-
getColumnMask
public Optional<ViewExpression> getColumnMask(String user, String catalog, String schema, String column)
-
getFilter
public Optional<ViewExpression> getFilter(String user, String catalog, String schema)
-
-