----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74528/#review225621 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java Lines 530 (patched) <https://reviews.apache.org/r/74528/#comment314101> Following calls would result in at least 3 database queries (or 6 queries when getCount=true): - getUsersLookup() - getGroupsLookup() - roleStore.getRoles() Is it possible to retrieve user/group/role names in a single query, with something like the following: (SELECT user_name AS principal_name, 0 AS principal_type FROM x_user WHERE user_name LIKE 'r%' AND is_visible = 1 ORDER BY user_name LIMIT 5) UNION (SELECT group_name AS principal_name, 1 AS principal_type FROM x_group WHERE group_name LIKE 'r%' AND is_visible = 1 ORDER BY group_name LIMIT 5) UNION (SELECT name AS principal_name, 2 AS principal_type FROM x_role WHERE name LIKE 'r%' ORDER BY name LIMIT 5) ORDER BY principal_name LIMIT 5; - Madhan Neethiraj On Aug. 1, 2023, 7:07 a.m., Prashant Satam wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74528/ > ----------------------------------------------------------- > > (Updated Aug. 1, 2023, 7:07 a.m.) > > > Review request for ranger, Madhan Neethiraj and Subhrat Chaudhary. > > > Bugs: RANGER-4325 > https://issues.apache.org/jira/browse/RANGER-4325 > > > Repository: ranger > > > Description > ------- > > We get users,groups,roles all we get in response from one API > (/xusers/users/groups/roles) we can also pass Query Params like > name,isVisible Also we can PartialSearch Name for users,groups,roles > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java > 9a2253a3d > > > Diff: https://reviews.apache.org/r/74528/diff/2/ > > > Testing > ------- > > We get users,groups,roles combined in response from API > (/xusers/users/groups/roles) we can pass query params like name(PartialSearch > Available),isVisible to filter the users,groups,roles we get in response > > > Thanks, > > Prashant Satam > >