validateAccess(requestMsg.getCommands(), command, CommandType.USER);
validateAccess(requestMsg.getCommands(), command, CommandType.USER);
validateAccess(requestMsg.getCommands(), command, CommandType.USER);
request.initMetadata(); this.originalCommand = cr.getCommand(requestMsg.getCommandString(), request.metadata, pi); if (!request.validateAccess(requestMsg.getCommands(), this.originalCommand, CommandType.CACHED)) { LogManager.logDetail(LogConstants.CTX_DQP, requestID, "Using result set cached results", cacheId); //$NON-NLS-1$ this.resultsBuffer = cr.getResults();
request.initMetadata(); this.originalCommand = cr.getCommand(requestMsg.getCommandString(), request.metadata, pi); if (!request.validateAccess(requestMsg.getCommands(), this.originalCommand, CommandType.CACHED)) { LogManager.logDetail(LogConstants.CTX_DQP, requestID, "Using result set cached results", cacheId); //$NON-NLS-1$ this.resultsBuffer = cr.getResults();
request.initMetadata(); this.originalCommand = cr.getCommand(requestMsg.getCommandString(), request.metadata, pi); if (!request.validateAccess(requestMsg.getCommands(), this.originalCommand, CommandType.CACHED)) { LogManager.logDetail(LogConstants.CTX_DQP, requestID, "Using result set cached results", cacheId); //$NON-NLS-1$ this.resultsBuffer = cr.getResults();
/** * Test Request.validateEntitlement(). * Make sure that this can be called both before and after metadata is initialized. * See defect 17209. * @throws Exception * @since 4.2 */ @Test public void testValidateEntitlement() throws Exception { QueryMetadataInterface metadata = RealMetadataFactory.example1Cached(); Request request = new Request(); Command command = QueryParser.getQueryParser().parseCommand(QUERY); QueryResolver.resolveCommand(command, metadata); RequestMessage message = new RequestMessage(); DQPWorkContext workContext = RealMetadataFactory.buildWorkContext(metadata, RealMetadataFactory.example1VDB()); request.initialize(message, BufferManagerFactory.getStandaloneBufferManager(), null, new FakeTransactionService(), TEMP_TABLE_STORE, workContext, null); request.initMetadata(); DefaultAuthorizationValidator drav = new DefaultAuthorizationValidator(); DataRolePolicyDecider drpd = new DataRolePolicyDecider(); drpd.setAllowCreateTemporaryTablesByDefault(true); drpd.setAllowFunctionCallsByDefault(true); drav.setPolicyDecider(drpd); request.setAuthorizationValidator(drav); request.validateAccess(new String[] {QUERY}, command, CommandType.USER); }