ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject ambari git commit: AMBARI-15411. RBAC: Name filter does not work for user with no role (rzang)
Date Mon, 14 Mar 2016 21:34:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk be57b745d -> b88aaa3ea


AMBARI-15411. RBAC: Name filter does not work for user with no role (rzang)


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

Branch: refs/heads/trunk
Commit: b88aaa3ea00be20ec65590d5dd4f9a67d2d8fecc
Parents: be57b74
Author: Richard Zang <rzang@apache.org>
Authored: Mon Mar 14 14:21:59 2016 -0700
Committer: Richard Zang <rzang@apache.org>
Committed: Mon Mar 14 14:33:41 2016 -0700

----------------------------------------------------------------------
 .../resources/ui/admin-web/app/scripts/services/Cluster.js     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b88aaa3e/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
index d01646a..806247a 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
@@ -139,8 +139,10 @@ angular.module('ambariAdminConsole')
     },
     getPrivilegesWithFilters: function(params) {
       var deferred = $q.defer();
-      var endpoint = params.typeFilter.value == 'USER'? '/users' : '/groups';
-      var nameFilter = params.nameFilter? '&privileges/PrivilegeInfo/principal_name.matches(.*'
+ params.nameFilter + '.*)' : '';
+      var isUser = params.typeFilter.value == 'USER';
+      var endpoint = isUser? '/users' : '/groups';
+      var nameURL = isUser? '&Users/user_name.matches(.*' : '&Groups/group_name.matches(.*';
+      var nameFilter = params.nameFilter? nameURL + params.nameFilter + '.*)' : '';
       var roleFilter = params.roleFilter.value? '&privileges/PrivilegeInfo/permission_name.matches(.*'
+ params.roleFilter.value + '.*)' : '';
       $http({
         method: 'GET',


Mime
View raw message