ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sangee...@apache.org
Subject ambari git commit: AMBARI-19542: Cannot change group/user privileges in list view if the user has VIEW.USER privilege (sangeetar)
Date Wed, 25 Jan 2017 18:23:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 b84a32b37 -> 8a4439e55


AMBARI-19542: Cannot change group/user privileges in list view if the user has VIEW.USER privilege
(sangeetar)


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

Branch: refs/heads/branch-2.5
Commit: 8a4439e55453a86ec6f256499ca4bf398100efbd
Parents: b84a32b
Author: Sangeeta Ravindran <sangeetar@apache.org>
Authored: Wed Jan 25 10:22:51 2017 -0800
Committer: Sangeeta Ravindran <sangeetar@apache.org>
Committed: Wed Jan 25 10:23:09 2017 -0800

----------------------------------------------------------------------
 .../controllers/clusters/UserAccessListCtrl.js      | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8a4439e5/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
index 9869d0b..3737414 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
@@ -148,10 +148,12 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams,
Permissio
         var privilegesOfTypeUser = [];
         var privilegesOfTypeGroup = [];
         for (var i = 0; i < arrayOfPrivileges.length; i++) {
-          if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){
-            privilegesOfTypeGroup.push(arrayOfPrivileges[i]);
-          } else {
-            privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo);
+          if(arrayOfPrivileges[i].PrivilegeInfo.permission_name != "VIEW.USER") {
+            if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){
+              privilegesOfTypeGroup.push(arrayOfPrivileges[i]);
+            } else {
+              privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo);
+            }
           }
         }
 
@@ -204,8 +206,10 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams,
Permissio
         user.editable = (Cluster.ineditableRoles.indexOf(privilege.permission_name) === -1);
 
         arrayOfPrivileges.forEach(function(privilegeOfTypeGroup) {
-          if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") {
-            privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo);
+          if(privilegeOfTypeGroup.PrivilegeInfo.permission_name != "VIEW.USER") {
+            if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") {
+              privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo);
+            }
           }
         });
 


Mime
View raw message