> On Aug. 18, 2021, 7:13 p.m., Abhay Kulkarni wrote: > > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java > > Lines 4847 (patched) > > <https://reviews.apache.org/r/73522/diff/2/?file=2251984#file2251984line4847> > > > > If there are no groups for given user when database query returns, will > > the groupNames be null (or empty set)? > > > > Please consider adding public group even when the groupNames is null ( > > by creating a HashSet containing only "public" group and assigniing it to > > groupNames). Then the test on line 4851 is not required.
DB query return empty if no group(s) found for the given user, So removed null check. - Mateen ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73522/#review223354 ----------------------------------------------------------- On Aug. 19, 2021, 6:08 a.m., Mateen Mansoori wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73522/ > ----------------------------------------------------------- > > (Updated Aug. 19, 2021, 6:08 a.m.) > > > Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, > Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy. > > > Bugs: RANGER-3372 > https://issues.apache.org/jira/browse/RANGER-3372 > > > Repository: ranger > > > Description > ------- > > PROBLEM STATEMENT : > We have a user called "A" > User A belongs to 2 Groups [Group 1 and Group 2 ] > Group 1 is assigned to Hive Policy [Test 1 ] > Group 2 is assigned to Hive Policy [Test 2 ] > > Now while searching user "A" in Ranger Reports , We can only see 1 of the > Policy is listing , Expected behaviour should be : Both policy should be > displayed in reports. > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java > b9a926b33 > > > Diff: https://reviews.apache.org/r/73522/diff/3/ > > > Testing > ------- > > Ran - mvn clean compile test verify install > Testing - Tested on local VM. > > > Thanks, > > Mateen Mansoori > >