ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zsombor Gegesy <zsom...@apache.org>
Subject Re: Review Request 70254: User creation POST and PUT response not showing groupIdList and groupNameList with expected data
Date Wed, 20 Mar 2019 20:18:32 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70254/#review213847
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java
Lines 485 (patched)
<https://reviews.apache.org/r/70254/#comment299946>

    Modifying a function argument is not the cleanest solution - it's a bit suprising for
the casual reader, that the function is called for side effects. 
    
        trxLogList.addAll(createOrDelGrpUserWithUpdatedGrpId(vXUser, groupIdList, userId,
groupUsersToRemove));
        
        private List<XXTrxLog> createOrDelGrpUserWithUpdatedGrpId(VXUser vXUser, Collection<Long>
groupIdList,
    			List<XXTrxLog> trxLogList, Long userId, List<Long> groupUsersToRemove)
{ 
          List<XXTrxLog> trxLogList = new ArrayList<>();
          ...
        }



security-admin/src/test/java/org/apache/ranger/biz/TestXUserMgr.java
Line 610 (original), 616 (patched)
<https://reviews.apache.org/r/70254/#comment299947>

    Could you add a check that getGroupIdList() is not empty, but contains a group id?


- Zsombor Gegesy


On March 20, 2019, 1:26 p.m., Nikhil P wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70254/
> -----------------------------------------------------------
> 
> (Updated March 20, 2019, 1:26 p.m.)
> 
> 
> Review request for ranger, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal,
Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2373
>     https://issues.apache.org/jira/browse/RANGER-2373
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> User creation POST and PUT response should show groupIdList and groupNameList
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java fc40917 
>   security-admin/src/test/java/org/apache/ranger/biz/TestXUserMgr.java 49c57a6 
> 
> 
> Diff: https://reviews.apache.org/r/70254/diff/1/
> 
> 
> Testing
> -------
> 
> validated If user creation and updation response is showing expected list of group Id
/ group Name.
> 
> 1.Tested CRUD for users.
> 2.Tested CRUD for groups.
> 3.Checked adding users to group.
> 4.Checked users are getting deleted when groups are assigned to it.
> 
> 
> Thanks,
> 
> Nikhil P
> 
>


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