> On Oct. 18, 2023, 9:01 p.m., Madhan Neethiraj wrote:
> > security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java
> > Line 1385 (original), 1386 (patched)
> > <https://reviews.apache.org/r/74678/diff/3/?file=2281777#file2281777line1386>
> >
> > Instead of treating excludeDatasetId as a boolean flag, consider using
> > this query-parameter to specify that datasetId that needs to be excluded.
> > This should be used in the database query to exclude this dataset (with use
> > of "!=" operator).
After getting dataShares != datasetId from dataShareInDataset service the
result will require more queries to complete itself as we need is
*)get dataShares which are not mapped to any dataset AND existing mapped
datashares {to the datasetId}having status(DENIED,NONE)
- Prashant
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74678/#review225872
-----------------------------------------------------------
On Oct. 18, 2023, 8:53 a.m., Prashant Satam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74678/
> -----------------------------------------------------------
>
> (Updated Oct. 18, 2023, 8:53 a.m.)
>
>
> Review request for ranger, Anand Nadar, Ankita Sinha, Madhan Neethiraj,
> Monika Kachhadiya, and Subhrat Chaudhary.
>
>
> Bugs: RANGER-4397
> https://issues.apache.org/jira/browse/RANGER-4397
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Dataset Details >> Add a Datashare >> List Datashares pop up,
> Need a GET API to get all datashares, based on LIST ACL for current user
> Exclude existing one for which request is is available GRANTED, ACTIVE,
> REQUESTED states
> Response: id, Name, Descrption
> Request: datasetId, excludeExistingDataShare
> Filter: partial search on datashare name, Pagination
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/util/SearchFilter.java
> 93bd7f73d
> security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java
> 10986823d
> security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java
> 719d8a900
>
> security-admin/src/main/java/org/apache/ranger/db/XXGdsDataShareInDatasetDao.java
> 7637b275d
> security-admin/src/main/resources/META-INF/jpa_named_queries.xml 547913488
>
>
> Diff: https://reviews.apache.org/r/74678/diff/3/
>
>
> Testing
> -------
>
> 1)Create 1 dataset
> 2)create multiple dataShares
> 3)Link datasets to dataShares with status as ACITVE as well as DENIED
> 4)Get dataShares by GET-API(/service/gds/datashare/) using query param
> excludeDatasetId=true
> 5)You will only get dataShares which are not mapped to any dataset and
> existing mapped datashares having status(DENIED,NONE)
>
> Request------------->
> (/service/gds/datashare/?excludeDatasetId=true&datasetId=1&dataShareNamePartial=RangerDataShare11)
> Response------------>
> {
> "startIndex": 0,
> "pageSize": 200,
> "totalCount": 1,
> "resultSize": 1,
> "sortType": "dataShareId",
> "sortBy": "asc",
> "queryTimeMS": 1697525773619,
> "list": [
> {
> "id": 3,
> "guid": "cb7a8d8e-b082-4c4c-98c7-25b204e8b83c",
> "isEnabled": true,
> "createdBy": "Admin",
> "updatedBy": "Admin",
> "createTime": 1697525717000,
> "updateTime": 1697525717000,
> "version": 1,
> "name": "RangerDataShare11",
> "acl": {
> "users": {
> "admin": "ADMIN"
> }
> },
> "service": "Ranger_hive",
> "zone": " "
> }
> ],
> "listSize": 1
> }
>
>
> Thanks,
>
> Prashant Satam
>
>