You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ch...@apache.org on 2018/02/06 07:14:57 UTC

kylin git commit: KYLIN-3199 The login dialog should be closed when ldap user with no permission login correctly

Repository: kylin
Updated Branches:
  refs/heads/master 5bc5e659d -> ff6f6c73a


KYLIN-3199 The login dialog should be closed when ldap user with no permission login correctly

Signed-off-by: chenzhx <ch...@apache.org>

KYLIN-3222 The function of editing 'Advanced Dictionaries' in cube is unavailable

Signed-off-by: chenzhx <ch...@apache.org>


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

Branch: refs/heads/master
Commit: ff6f6c73ab7752cdf4ba6009a0ac09b94b5c738b
Parents: 5bc5e65
Author: xingpeng1 <xi...@zte.com.cn>
Authored: Sat Feb 3 11:14:23 2018 +0800
Committer: chenzhx <ch...@apache.org>
Committed: Tue Feb 6 15:14:23 2018 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeAdvanceSetting.js |  4 +---
 webapp/app/js/services/users.js                 | 15 +--------------
 2 files changed, 2 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/ff6f6c73/webapp/app/js/controllers/cubeAdvanceSetting.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index 7758238..dd00da4 100755
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -218,9 +218,7 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
           return false;
         }
       }
-      else {
-        $scope.cubeMetaFrame.dictionaries[$scope.updateDictionariesStatus.editIndex] = $scope.newDictionaries;
-      }
+      $scope.cubeMetaFrame.dictionaries[$scope.updateDictionariesStatus.editIndex] = $scope.newDictionaries;
     }
     else
       {

http://git-wip-us.apache.org/repos/asf/kylin/blob/ff6f6c73/webapp/app/js/services/users.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/users.js b/webapp/app/js/services/users.js
index 55c1508..bccd414 100644
--- a/webapp/app/js/services/users.js
+++ b/webapp/app/js/services/users.js
@@ -17,11 +17,6 @@
 */
 
 KylinApp.service('UserService', function ($http, $q) {
-    var roles = {
-        'ROLE_MODELER': '/models',
-        'ROLE_ANALYST': '/models',
-        'ROLE_ADMIN': '/models'
-    };
     var curUser = {};
 
     this.getCurUser = function () {
@@ -46,14 +41,6 @@ KylinApp.service('UserService', function ($http, $q) {
         return  curUser.userDetails && curUser.userDetails.authorities && curUser.userDetails.authorities.length > 0;
     };
     this.getHomePage = function () {
-        var homePage = "/login";
-
-        if (curUser.userDetails && curUser.userDetails.authorities) {
-            angular.forEach(curUser.userDetails.authorities, function (authority, index) {
-                homePage = (!!roles[authority.authority]) ? roles[authority.authority] : homePage;
-            });
-        }
-
-        return homePage;
+        return this.isAuthorized()? "/models" : "/login";
     }
 });