public class TestingAccessControlManager extends AccessControlManager
| Modifier and Type | Class and Description |
|---|---|
static class |
TestingAccessControlManager.TestingPrivilege |
static class |
TestingAccessControlManager.TestingPrivilegeType |
| Constructor and Description |
|---|
TestingAccessControlManager(TransactionManager transactionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkCanAddColumns(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to add columns to the specified table.
|
void |
checkCanCreateSchema(TransactionId transactionId,
Identity identity,
CatalogSchemaName schemaName)
Check if identity is allowed to create the specified schema.
|
void |
checkCanCreateTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to create the specified table.
|
void |
checkCanCreateView(TransactionId transactionId,
Identity identity,
QualifiedObjectName viewName)
Check if identity is allowed to create the specified view.
|
void |
checkCanCreateViewWithSelectFromColumns(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName,
Set<String> columnNames)
Check if identity is allowed to create a view that selects from the specified columns.
|
void |
checkCanDeleteFromTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to delete from the specified table.
|
void |
checkCanDropColumn(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to drop columns from the specified table.
|
void |
checkCanDropSchema(TransactionId transactionId,
Identity identity,
CatalogSchemaName schemaName)
Check if identity is allowed to drop the specified schema.
|
void |
checkCanDropTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to drop the specified table.
|
void |
checkCanDropView(TransactionId transactionId,
Identity identity,
QualifiedObjectName viewName)
Check if identity is allowed to drop the specified view.
|
void |
checkCanInsertIntoTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to insert into the specified table.
|
void |
checkCanRenameColumn(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to rename a column in the specified table.
|
void |
checkCanRenameSchema(TransactionId transactionId,
Identity identity,
CatalogSchemaName schemaName,
String newSchemaName)
Check if identity is allowed to rename the specified schema.
|
void |
checkCanRenameTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName,
QualifiedObjectName newTableName)
Check if identity is allowed to rename the specified table.
|
void |
checkCanSelectFromColumns(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName,
Set<String> columns)
Check if identity is allowed to select from the specified columns.
|
void |
checkCanSetCatalogSessionProperty(TransactionId transactionId,
Identity identity,
String catalogName,
String propertyName)
Check if identity is allowed to set the specified catalog property.
|
void |
checkCanSetSystemSessionProperty(Identity identity,
String propertyName)
Check if identity is allowed to set the specified system property.
|
void |
checkCanSetTableComment(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to comment the specified table.
|
void |
checkCanSetUser(Optional<Principal> principal,
String userName)
Check if the principal is allowed to be the specified user.
|
void |
deny(TestingAccessControlManager.TestingPrivilege... deniedPrivileges) |
static TestingAccessControlManager.TestingPrivilege |
privilege(String userName,
String entityName,
TestingAccessControlManager.TestingPrivilegeType type) |
static TestingAccessControlManager.TestingPrivilege |
privilege(String entityName,
TestingAccessControlManager.TestingPrivilegeType type) |
void |
reset() |
addCatalogAccessControl, addSystemAccessControlFactory, checkCanAccessCatalog, checkCanCreateRole, checkCanDropRole, checkCanGrantRoles, checkCanGrantTablePrivilege, checkCanRevokeRoles, checkCanRevokeTablePrivilege, checkCanSetRole, checkCanShowColumnsMetadata, checkCanShowCurrentRoles, checkCanShowRoleGrants, checkCanShowRoles, checkCanShowSchemas, checkCanShowTablesMetadata, filterCatalogs, filterColumns, filterSchemas, filterTables, getAuthenticationFail, getAuthenticationSuccess, getAuthorizationFail, getAuthorizationSuccess, loadSystemAccessControl, removeCatalogAccessControl, setSystemAccessControl@Inject public TestingAccessControlManager(TransactionManager transactionManager)
public static TestingAccessControlManager.TestingPrivilege privilege(String entityName, TestingAccessControlManager.TestingPrivilegeType type)
public static TestingAccessControlManager.TestingPrivilege privilege(String userName, String entityName, TestingAccessControlManager.TestingPrivilegeType type)
public void deny(TestingAccessControlManager.TestingPrivilege... deniedPrivileges)
public void reset()
public void checkCanSetUser(Optional<Principal> principal, String userName)
AccessControlcheckCanSetUser in interface AccessControlcheckCanSetUser in class AccessControlManagerpublic void checkCanCreateSchema(TransactionId transactionId, Identity identity, CatalogSchemaName schemaName)
AccessControlcheckCanCreateSchema in interface AccessControlcheckCanCreateSchema in class AccessControlManagerpublic void checkCanDropSchema(TransactionId transactionId, Identity identity, CatalogSchemaName schemaName)
AccessControlcheckCanDropSchema in interface AccessControlcheckCanDropSchema in class AccessControlManagerpublic void checkCanRenameSchema(TransactionId transactionId, Identity identity, CatalogSchemaName schemaName, String newSchemaName)
AccessControlcheckCanRenameSchema in interface AccessControlcheckCanRenameSchema in class AccessControlManagerpublic void checkCanCreateTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanCreateTable in interface AccessControlcheckCanCreateTable in class AccessControlManagerpublic void checkCanDropTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanDropTable in interface AccessControlcheckCanDropTable in class AccessControlManagerpublic void checkCanRenameTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, QualifiedObjectName newTableName)
AccessControlcheckCanRenameTable in interface AccessControlcheckCanRenameTable in class AccessControlManagerpublic void checkCanSetTableComment(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanSetTableComment in interface AccessControlcheckCanSetTableComment in class AccessControlManagerpublic void checkCanAddColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanAddColumns in interface AccessControlcheckCanAddColumns in class AccessControlManagerpublic void checkCanDropColumn(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanDropColumn in interface AccessControlcheckCanDropColumn in class AccessControlManagerpublic void checkCanRenameColumn(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanRenameColumn in interface AccessControlcheckCanRenameColumn in class AccessControlManagerpublic void checkCanInsertIntoTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanInsertIntoTable in interface AccessControlcheckCanInsertIntoTable in class AccessControlManagerpublic void checkCanDeleteFromTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanDeleteFromTable in interface AccessControlcheckCanDeleteFromTable in class AccessControlManagerpublic void checkCanCreateView(TransactionId transactionId, Identity identity, QualifiedObjectName viewName)
AccessControlcheckCanCreateView in interface AccessControlcheckCanCreateView in class AccessControlManagerpublic void checkCanDropView(TransactionId transactionId, Identity identity, QualifiedObjectName viewName)
AccessControlcheckCanDropView in interface AccessControlcheckCanDropView in class AccessControlManagerpublic void checkCanSetSystemSessionProperty(Identity identity, String propertyName)
AccessControlcheckCanSetSystemSessionProperty in interface AccessControlcheckCanSetSystemSessionProperty in class AccessControlManagerpublic void checkCanCreateViewWithSelectFromColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, Set<String> columnNames)
AccessControlcheckCanCreateViewWithSelectFromColumns in interface AccessControlcheckCanCreateViewWithSelectFromColumns in class AccessControlManagerpublic void checkCanSetCatalogSessionProperty(TransactionId transactionId, Identity identity, String catalogName, String propertyName)
AccessControlcheckCanSetCatalogSessionProperty in interface AccessControlcheckCanSetCatalogSessionProperty in class AccessControlManagerpublic void checkCanSelectFromColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, Set<String> columns)
AccessControlcheckCanSelectFromColumns in interface AccessControlcheckCanSelectFromColumns in class AccessControlManagerCopyright © 2012–2019. All rights reserved.