public interface AuthorizationValidator
| Modifier and Type | Interface and Description |
|---|---|
static class |
AuthorizationValidator.CommandType |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasRole(String roleName,
CommandContext commandContext)
Uses the context or other information to determine if the current user has the given role name.
|
boolean |
isAccessible(AbstractMetadataRecord record,
CommandContext commandContext)
Determines if the metadata record is accessible in system queries
|
boolean |
validate(String[] originalSql,
Command command,
QueryMetadataInterface metadata,
CommandContext commandContext,
AuthorizationValidator.CommandType commandType)
Validates the given command.
|
boolean validate(String[] originalSql, Command command, QueryMetadataInterface metadata, CommandContext commandContext, AuthorizationValidator.CommandType commandType) throws QueryValidatorException, TeiidComponentException
AuthorizationValidator.CommandType.USER command, the command object should not be modified.
Any modification must be fully resolved using the associated QueryMetadataInterface. Returning true for a
AuthorizationValidator.CommandType.PREPARED or AuthorizationValidator.CommandType.CACHED commands means that the matching prepared plan or cache entry
will not be used.originalSql - array of commands will typically contain only a single string, but may have multiple for batched updates.command - the parsed and resolved command.metadata - commandContext - commandType - QueryValidatorExceptionTeiidComponentExceptionboolean hasRole(String roleName, CommandContext commandContext)
roleName - commandContext - boolean isAccessible(AbstractMetadataRecord record, CommandContext commandContext)
record - commandContext - Copyright © 2019. All rights reserved.