KYLIN-2760, change annotation to AclEvaluate call.

Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/59779854
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/59779854
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/59779854

Branch: refs/heads/sync
Commit: 597798544f5164b215a395d35a52e3f36354e410
Parents: a875818
Author: tttMelody <245915...@qq.com>
Authored: Mon Jan 15 20:19:37 2018 +0800
Committer: Li Yang <liy...@apache.org>
Committed: Fri Jan 26 18:58:10 2018 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/rest/service/CubeService.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/59779854/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
----------------------------------------------------------------------
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java 
b/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
index 73fb4b6..a81cc24 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java
@@ -827,9 +827,9 @@ public class CubeService extends BasicService implements 
InitializingBean {
         return formattedRollingUpCount;
     }
 
-    @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN + " or hasPermission(#cube, 
'ADMINISTRATION')")
     public Map<Long, Long> getRecommendCuboidStatistics(CubeInstance cube, 
Map<Long, Long> hitFrequencyMap,
             Map<Long, Map<Long, Long>> rollingUpCountSourceMap) throws 
IOException {
+        aclEvaluate.checkProjectAdminPermission(cube.getProject());
         return CuboidRecommenderUtil.getRecommendCuboidList(cube, 
hitFrequencyMap, rollingUpCountSourceMap);
     }
 }

Reply via email to