You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ni...@apache.org on 2021/04/30 05:43:07 UTC

[ranger] branch master updated (a808f38 -> 14c24f0)

This is an automated email from the ASF dual-hosted git repository.

ni3galave pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git.


    from a808f38  RANGER-3253: Make incremental policy change computation more resilient
     new b856244  RANGER-3247 : [UI-improvement] Ranger admin audit log does not show service/repo name in the policy operation.
     new 14c24f0  RANGER-3062 : Even after removing ‘Security Zone’ permission for an user, UI still shows ‘Security Zone’ tab.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/webapp/scripts/utils/XAGlobals.js     |  1 +
 .../main/webapp/scripts/views/common/ErrorView.js  |  2 +
 .../webapp/scripts/views/reports/AuditLayout.js    |  3 +-
 .../views/reports/PlugableServiceDiffDetail.js     |  3 +-
 .../main/webapp/templates/common/TopNav_tmpl.html  | 44 ++++++++++++----------
 .../PlugableServicePolicyDeleteDiff_tmpl.html      |  3 +-
 .../reports/PlugableServicePolicyDiff_tmpl.html    |  3 +-
 .../PlugableServicePolicyUpdateDiff_tmpl.html      |  3 +-
 8 files changed, 37 insertions(+), 25 deletions(-)

[ranger] 02/02: RANGER-3062 : Even after removing ‘Security Zone’ permission for an user, UI still shows ‘Security Zone’ tab.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ni3galave pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit 14c24f022e0fd5f10bd400df9f778236d1ab8c80
Author: Nitin Galave <ni...@apache.org>
AuthorDate: Tue Apr 27 18:09:07 2021 +0530

    RANGER-3062 : Even after removing ‘Security Zone’ permission for an user, UI still shows ‘Security Zone’ tab.
---
 .../src/main/webapp/scripts/utils/XAGlobals.js     |  1 +
 .../main/webapp/scripts/views/common/ErrorView.js  |  2 +
 .../main/webapp/templates/common/TopNav_tmpl.html  | 44 ++++++++++++----------
 3 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/security-admin/src/main/webapp/scripts/utils/XAGlobals.js b/security-admin/src/main/webapp/scripts/utils/XAGlobals.js
index 5132e8f..4b0c98e 100644
--- a/security-admin/src/main/webapp/scripts/utils/XAGlobals.js
+++ b/security-admin/src/main/webapp/scripts/utils/XAGlobals.js
@@ -72,6 +72,7 @@ define(function(require){
 			'Encryption'     : {'Key Manager' : ['kmsManagerAction','kmsKeyCreateAction'] },
 			'Settings'		 : {'Users/Groups' : ['userManagerAction','userCreateAction','userEditAction','groupCreateAction','groupEditAction'],
 								'Permissions' : ['modulePermissionsAction','modulePermissionEditAction'] },
+			'Security Zone'  : ['zoneManagmentAction', 'RangerZoneCreateAction', 'RangerZoneEditAction'],
 		};
 	
 	XAGlobals.ActionType = {
diff --git a/security-admin/src/main/webapp/scripts/views/common/ErrorView.js b/security-admin/src/main/webapp/scripts/views/common/ErrorView.js
index f0a60ad..63dceb7 100644
--- a/security-admin/src/main/webapp/scripts/views/common/ErrorView.js
+++ b/security-admin/src/main/webapp/scripts/views/common/ErrorView.js
@@ -74,6 +74,7 @@ define(function(require){
 		onRender: function() {
 			this.initializePlugins();
 			$('#r_breadcrumbs').hide();
+			$('.latestResponse').hide();
 			var msg = '', moreInfo = '';
 			if(this.status == 401){
 				msg = 'Access Denied (401)';
@@ -108,6 +109,7 @@ define(function(require){
 		/** on close */
 		onClose: function(){
 			$('#r_breadcrumbs').show();
+			$('.latestResponse').show();
 		}
 
 	});
diff --git a/security-admin/src/main/webapp/templates/common/TopNav_tmpl.html b/security-admin/src/main/webapp/templates/common/TopNav_tmpl.html
index 4b22f6c..3991414 100644
--- a/security-admin/src/main/webapp/templates/common/TopNav_tmpl.html
+++ b/security-admin/src/main/webapp/templates/common/TopNav_tmpl.html
@@ -44,16 +44,18 @@
                     {{/hasAccessToTab}}
                 </ul>
             </li>
-            {{^hideSecurityZoneTab}}
-                <li>
-                    <a href="#!/zones/zone/list" id="nav6">
-                        <span class="zone-icon fa-stack fa-lg">
-                          <i class="fa fa-square-o fa-stack-2x"></i>
-                          <i class="fa fa-bolt fa-stack-1x"></i>
-                        </span>{{tt 'h.securityZone'}}
-                    </a>
-                </li>
-            {{/hideSecurityZoneTab}}
+            {{#hasAccessToTab  'Security Zone'}}
+                {{^hideSecurityZoneTab}}
+                    <li>
+                        <a href="#!/zones/zone/list" id="nav6">
+                            <span class="zone-icon fa-stack fa-lg">
+                              <i class="fa fa-square-o fa-stack-2x"></i>
+                              <i class="fa fa-bolt fa-stack-1x"></i>
+                            </span>{{tt 'h.securityZone'}}
+                        </a>
+                    </li>
+                {{/hideSecurityZoneTab}}
+            {{/hasAccessToTab}}
             <li class="dropdown">
                 <a href="javascript:;" id="nav5"><i class="fa-fw fa fa-gear"></i> {{tt 'h.settings'}} </a>
                 <ul class="dropdown-menu">
@@ -89,16 +91,18 @@
                     {{/hasAccessToTab}}
                 </ul>
             </li>
-            {{^hideSecurityZoneTab}}
-                <li>
-                    <a href="#!/zones/zone/list" id="nav6">
-                        <span class="zone-icon fa-stack fa-lg">
-                          <i class="fa fa-square-o fa-stack-2x"></i>
-                          <i class="fa fa-bolt fa-stack-1x"></i>
-                        </span>{{tt 'h.securityZone'}}
-                    </a>
-                </li>
-            {{/hideSecurityZoneTab}}
+            {{#hasAccessToTab  'Security Zone'}}
+                {{^hideSecurityZoneTab}}
+                    <li>
+                        <a href="#!/zones/zone/list" id="nav6">
+                            <span class="zone-icon fa-stack fa-lg">
+                              <i class="fa fa-square-o fa-stack-2x"></i>
+                              <i class="fa fa-bolt fa-stack-1x"></i>
+                            </span>{{tt 'h.securityZone'}}
+                        </a>
+                    </li>
+                {{/hideSecurityZoneTab}}
+            {{/hasAccessToTab}}
             {{#hasAccessToTab  'Users/Groups'}}
                 <li><a href="#!/users/usertab" id="nav5"><i class="fa-fw fa fa-gear"></i> {{tt 'h.settings'}} </a></li>
             {{/hasAccessToTab}}

[ranger] 01/02: RANGER-3247 : [UI-improvement] Ranger admin audit log does not show service/repo name in the policy operation.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ni3galave pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit b8562443ad881e3cff9aad270c67650b3575f545
Author: Nitin Galave <ni...@apache.org>
AuthorDate: Mon Apr 19 17:07:29 2021 +0530

    RANGER-3247 : [UI-improvement] Ranger admin audit log does not show service/repo name in the policy operation.
---
 security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js    | 3 ++-
 .../src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js | 3 ++-
 .../webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html | 3 ++-
 .../main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html  | 3 ++-
 .../webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
index 63bb024..2acf35f 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
@@ -909,7 +909,8 @@ define(function(require) {
 								objectId   : self.model.get('objectId'),
 								objectCreatedDate : objectCreatedDate,
 								userName :self.model.get('owner'),
-								action : action
+								action : action,
+								repoName : self.model.get('parentObjectName'),
 							});
 						} else if (self.model.get('objectClassType') == XAEnums.ClassTypes.CLASS_TYPE_RANGER_SECURITY_ZONE.value){
 							var view = new vOperationDiffDetail({
diff --git a/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js b/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
index c319d81..3e0f2f4 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
@@ -69,6 +69,7 @@ define(function(require){
 					zoneName: zoneName,
 					newPolicyConditions: this.newConditions,
 					oldPolicyCondition: this.oldConditions,
+					repoName: this.repoName,
 
         		};
         },
@@ -96,7 +97,7 @@ define(function(require){
 		*/
 		initialize: function(options) {
 			console.log("initialized a PlugableServiceDiffDetail ItemView");
-                        _.extend(this, _.pick(options, 'classType','objectName','objectId','objectCreatedDate','action','userName','policyId','policyLabels'));
+                        _.extend(this, _.pick(options, 'classType','objectName','objectId','objectCreatedDate','action','userName','policyId','policyLabels','repoName'));
 			this.bindEvents();
 			this.initializeServiceDef();
 			this.getTemplateForView();
diff --git a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html
index 6b58d9b..3166402 100644
--- a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html
@@ -15,8 +15,9 @@
   limitations under the License.
 --}}
 <div class="diff-content">
-    <b>Policy ID:</b><label class="badge badge-ranger"> {{objectId}}</div>
+    <div><b>Policy ID:</b><label class="badge badge-ranger"> {{objectId}}</div>
     <div class="no-margin label-size13-weightbold">Policy Name: {{policyName}}</div>
+    <div class="no-margin label-size13-weightbold">Service Name: {{repoName}}</div>
     {{#if zoneName}}
         <div class="no-margin label-size13-weightbold">Zone Name: {{zoneName}}</div>
     {{/if}}
diff --git a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html
index 7fe4665..5a54d62 100644
--- a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html
@@ -15,8 +15,9 @@
   limitations under the License.
 --}}
 <div class="diff-content">
-    <b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</div>
+    <div><b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</div>
         <div class="no-margin label-size13-weightbold">Policy Name: {{policyName}}</div>
+        <div class="no-margin label-size13-weightbold">Service Name: {{repoName}}</div>
         {{#if zoneName}}
             <div class="no-margin label-size13-weightbold">Zone Name: {{zoneName}}</div>
         {{/if}}
diff --git a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html
index c9901b5..3af680f 100644
--- a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html
@@ -17,8 +17,9 @@
 <div class="diff-content">
 	<div class="row">
 		<div class="col-md-6">
-			<b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</label>
+			<div><b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</label></div>
 			<label class="no-margin label-size13-weightbold">Policy Name : {{policyName}}</label>
+			<div class="no-margin label-size13-weightbold">Service Name: {{repoName}}</div>
             {{#if zoneName}}
                 <label class="no-margin label-size13-weightbold" > Zone Name  &nbsp;&nbsp;:  {{zoneName}}</label>
             {{/if}}