ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject incubator-ranger git commit: RANGER-575 : Allow KMS policies to be assigned to all users
Date Mon, 06 Jul 2015 09:28:21 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 07ab4e8f2 -> 365186294


RANGER-575 : Allow KMS policies to be assigned to all users

Signed-off-by: sneethiraj <sneethir@apache.org>


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

Branch: refs/heads/master
Commit: 3651862943b5ac9b3fe353adb1c7948ef00ff919
Parents: 07ab4e8
Author: Gautam Borad <gborad@gmail.com>
Authored: Mon Jul 6 13:58:41 2015 +0530
Committer: sneethiraj <sneethir@apache.org>
Committed: Mon Jul 6 05:11:43 2015 -0400

----------------------------------------------------------------------
 .../main/webapp/scripts/views/policies/PermissionList.js | 11 +----------
 .../src/main/webapp/scripts/views/users/UserForm.js      |  3 ++-
 2 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/36518629/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
index 0901892..0cba319 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
@@ -200,16 +200,7 @@ define(function(require) {
 					url: url,
 					dataType: 'json',
 					data: function (term, page) {
-						var data = { name : term, isVisible : XAEnums.VisibilityStatus.STATUS_VISIBLE.value
};
-						var userRoleList = []
-						_.each(XAEnums.UserRoles,function(val, key){
-							if(SessionMgr.isKeyAdmin() && XAEnums.UserRoles.ROLE_KEY_ADMIN.value == val.value){
-								userRoleList.push(key)
-							}else if(!SessionMgr.isKeyAdmin() && XAEnums.UserRoles.ROLE_KEY_ADMIN.value
!= val.value){
-								userRoleList.push(key)
-							}
-						})
-						return _.extend(data,{'userRoleList' : userRoleList });
+						return {name : term, isVisible : XAEnums.VisibilityStatus.STATUS_VISIBLE.value};
 					},
 					results: function (data, page) { 
 						var results = [] , selectedVals = [];

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/36518629/security-admin/src/main/webapp/scripts/views/users/UserForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/users/UserForm.js b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
index 31e99ce..52a278d 100644
--- a/security-admin/src/main/webapp/scripts/views/users/UserForm.js
+++ b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
@@ -144,7 +144,8 @@ define(function(require){
 				
 				if(SessionMgr.getUserProfile().get('loginId') != "admin"){
 					if(this.model.get('name') != "admin"){
-						if(_.contains(SessionMgr.getUserProfile().get('userRoleList'),'ROLE_SYS_ADMIN')){
+						if(_.contains(SessionMgr.getUserProfile().get('userRoleList'),'ROLE_SYS_ADMIN') 
+								|| _.contains(SessionMgr.getUserProfile().get('userRoleList'),'ROLE_KEY_ADMIN')){
 							this.fields.userRoleList.editor.$el.attr('disabled',false);
 						}else{
 							if(!SessionMgr.isKeyAdmin()){


Mime
View raw message