From c2d3e4b6f55520b2bdbbc150e92ea57299e313c6 Mon Sep 17 00:00:00 2001 From: debugger87 Date: Thu, 22 Sep 2016 18:09:21 +0800 Subject: [PATCH] [KYLIN-2038] Don't checkAuthorization if the sqlResponse's cube name is empty string --- .../java/org/apache/kylin/rest/controller/QueryController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java b/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java index 62cb0a7..81418ee 100644 --- a/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java +++ b/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -66,7 +66,7 @@ import net.sf.ehcache.Element; /** * Handle query requests. - * + * * @author xduo */ @Controller @@ -254,11 +254,11 @@ public class QueryController extends BasicController { } private void checkQueryAuth(SQLResponse sqlResponse) throws AccessDeniedException { - if (!sqlResponse.getIsException() && KylinConfig.getInstanceFromEnv().isQuerySecureEnabled()) { + if (!sqlResponse.getIsException() && KylinConfig.getInstanceFromEnv().isQuerySecureEnabled() && !sqlResponse.getCube().equals("")) { queryService.checkAuthorization(sqlResponse.getCube()); } } - + public void setQueryService(QueryService queryService) { this.queryService = queryService; } -- 2.0.0