Author: shawkins
Date: 2011-05-20 10:46:55 -0400 (Fri, 20 May 2011)
New Revision: 3182
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
Log:
TEIID-1595 added checks for implicit temp table create
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-05-19
19:15:52 UTC (rev 3181)
+++
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-05-20
14:46:55 UTC (rev 3182)
@@ -224,6 +224,10 @@
obj.getVariables(),
DataPolicy.PermissionType.CREATE,
Context.INSERT);
+
+ if (obj.getGroup().isTempTable()) {
+ validateTemp(Collections.singleton(obj.getGroup().getNonCorrelationName()),
Arrays.asList(obj.getGroup()), Context.INSERT);
+ }
}
/**
@@ -270,6 +274,9 @@
Into intoObj = obj.getInto();
if ( intoObj != null ) {
GroupSymbol intoGroup = intoObj.getGroup();
+ if (intoGroup.isTempTable()) {
+ validateTemp(Collections.singleton(intoGroup.getNonCorrelationName()),
Arrays.asList(intoGroup), Context.INSERT);
+ }
List<ElementSymbol> intoElements = null;
try {
intoElements = ResolverUtil.resolveElementsInGroup(intoGroup,
getMetadata());
Show replies by date