ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pradeep Agrawal <pradeepagrawal8...@gmail.com>
Subject Review Request 69253: RANGER-2278 Unable to delete user if he has references in new ref tables
Date Mon, 05 Nov 2018 14:56:07 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Nikhil P, Ramesh
Mani, and Velmurugan Periasamy.

Bugs: RANGER-2278

Repository: ranger


**Problem Statement:** 
Created a service/policy from a user. While trying to delete the same user, I was unable to
delete the user as "added_by_id" and "upd_by_id" field are having references to x_portal_user(id).
so due to foreign key constraint ranger doesn't allow user deletion. 

This is related to RANGER-2203 as policy structure has been changed and new tables are also
having "added_by_id" and "upd_by_id" columns.

**Proposed Solution:**
Proposed solution shall set the added_by_id and upd_by_id field value with the user id of
current logged in user.


  security-admin/src/main/java/org/apache/ranger/service/XPortalUserService.java 5f5b5c4c1

Diff: https://reviews.apache.org/r/69253/diff/1/


Steps performed for Ranger-admin(with patch):
1. Created Build with patch and untar the build.
2. Opened install.properties and provided db configuration in install.properties
3. Called setup.sh
4. Started Ranger admin.
5. Logged in from admin user and created a user testuser1 with admin role. Loggedout from
admin account.
6. Logged in from testuser1 id and created a service. Loggedout from testuser1 account.
7. Logged in from admin user and delete user testuser1.

**Expected Behavior:**
testuser1 should be deleted and foreign key references should be updated.

**Actual Behavior:**
testuser1 was deleted and foreign key references was updated.


Pradeep Agrawal

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message