----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74611/#review225775 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/rest/GdsREST.java Lines 835 (patched) <https://reviews.apache.org/r/74611/#comment314202> In case of failure in adding any datashare (like due to permission issue), this method will result in an exception but few input entries will be processed. To ensure all-or-none, add a method in gdsStore and call this new method from here. Given this method is to add multiple datashares into a specific dataset, consider using REST API path of a dataset i.e. replace "POST /datashare/dataset/multiple" with "POST /dataset/{id}/datashares" - Madhan Neethiraj On Sept. 19, 2023, 5:13 p.m., Subhrat Chaudhary wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74611/ > ----------------------------------------------------------- > > (Updated Sept. 19, 2023, 5:13 p.m.) > > > Review request for ranger, Anand Nadar, Ankita Sinha, Madhan Neethiraj, > Monika Kachhadiya, and Prashant Satam. > > > Bugs: https://issues.apache.org/jira/browse/RANGER-4415 > > https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/RANGER-4415 > > > Repository: ranger > > > Description > ------- > > In Dataset details page - Add datashare - user can select multiple datasets > and send request to dataset owner. We need a new POST API that can accept > request for multiple datashares. > Added API /datashare/dataset/multiple to accept > List<RangerDataShareInDataset> and return List<RangerDataShareInDataset>. > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/rest/GdsREST.java 653e397d4 > > security-admin/src/main/java/org/apache/ranger/security/context/RangerAPIList.java > de9014072 > > > Diff: https://reviews.apache.org/r/74611/diff/1/ > > > Testing > ------- > > Validated: > 1. Addition of multiple datashares in POST API. > 2. Tried to add duplicate request (same datashare and dataset ID), 400 is > thrown. > > > Thanks, > > Subhrat Chaudhary > >