You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by rm...@apache.org on 2021/10/19 17:20:33 UTC

[ranger] branch ranger-2.2 updated: RANGER-3480: Policy version in access audit is not matching with the policy version seen in policy view

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

rmani pushed a commit to branch ranger-2.2
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/ranger-2.2 by this push:
     new 919ce3c  RANGER-3480: Policy version in access audit is not matching with the policy version seen in policy view
919ce3c is described below

commit 919ce3cfa66541f594b8a86a8ad8ba70b3825671
Author: pradeep <pr...@apache.org>
AuthorDate: Wed Oct 13 22:01:44 2021 +0530

    RANGER-3480: Policy version in access audit is not matching with the policy version seen in policy view
---
 .../src/main/java/org/apache/ranger/db/XXPolicyChangeLogDao.java         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXPolicyChangeLogDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXPolicyChangeLogDao.java
index 8a1719f..137b241 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXPolicyChangeLogDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXPolicyChangeLogDao.java
@@ -147,6 +147,7 @@ public class XXPolicyChangeLogDao extends BaseDao<XXPolicyChangeLog> {
                             if (policy.getServiceType() == null) {
                                 policy.setServiceType(serviceType);
                             }
+                            policy.setVersion(xxPolicy.getVersion());
                         } catch (Exception e) {
                             LOG.error("Cannot read policy:[" + policyId + "]. Should not have come here!! Offending log-record-id:[" + logRecordId + "] and returning...", e);
                             ret.clear();