> On Oct. 14, 2020, 1:34 a.m., Madhan Neethiraj wrote: > > security-admin/src/main/java/org/apache/ranger/service/XGroupUserService.java > > Lines 109 (patched) > > <https://reviews.apache.org/r/72959/diff/1/?file=2240724#file2240724line109> > > > > Consider moving #109 to inside following for-loop: > > > > for (String userName : users) { > > ... > > > > XXGroupUser xxGroupUser = groupUsers.get(username); > > boolean groupUserMappingExists = xxGroupUser != null; > > > > ... > > > > if (groupUserMappingExists) { > > xxGroupUser = getDao().update(xxGroupUser); > > } else { > > xxGroupUser = new XXGroupUser(); > > > > ... > > > > xxGroupUser = getDao().create(xxGroupUser); > > } > > }
Moved #109 inside for-loop as suggested. But still we need to create xxGroupUser when it is null before #122. Hope this is ok. - Sailaja ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72959/#review222042 ----------------------------------------------------------- On Oct. 14, 2020, 1:20 a.m., Sailaja Polavarapu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72959/ > ----------------------------------------------------------- > > (Updated Oct. 14, 2020, 1:20 a.m.) > > > Review request for ranger, Abhay Kulkarni, Mahesh Bandal, Mehul Parikh, > Ramesh Mani, and Velmurugan Periasamy. > > > Bugs: RANGER-3038 > https://issues.apache.org/jira/browse/RANGER-3038 > > > Repository: ranger > > > Description > ------- > > Fixed issue with group memberships update to ranger admin. > > > Diffs > ----- > > > security-admin/src/main/java/org/apache/ranger/service/XGroupUserService.java > 74431b0e0 > security-admin/src/main/resources/META-INF/jpa_named_queries.xml a8f581849 > > > Diff: https://reviews.apache.org/r/72959/diff/1/ > > > Testing > ------- > > Patched cluster with changes and verified the functionality. > > > Thanks, > > Sailaja Polavarapu > >
