Folder Filter Returning Duplicate Resources
Folder Filter Returning Duplicate Resources
Passbolt Version: 4.9.1 Platform and Target: -- Operating system: Ubuntu 20.04.6 LTS -- PHP: 7.4.3-4ubuntu2.24 -- Web server: Nginx 1.18.0 -- Database server: MySQL 15.1
What you did
When I fetch /resources.json with the has-parent filter, it returns a lot of duplicate entries.
Request example: GET https://base_url/resources.json?filter%5Bhas-parent%5D=3dda7223-35a4-4010-b86f-d2a0530e3ddf
What happened
The filter correctly returns only the resources within the folder, but each resource is returned multiple times. It seems the results are multiplied by the number of users who can access that resource. For example, if I have 40 resources in a folder and share it with a group of 8 members, using the has-parent filter returns 320 resources, with each resource duplicated 8 times.
I noticed that if a folder is shared with more than one group and there is a user who is in both groups, the entry will only return once for that user.
What you expected to happen
I expected the result to include only the resources within the folder, with each entry being returned once.
Thank @Paulo1402 we'll have a look (PB-35980) For the avoidance of doubt can make sure you make sure the data is clean:
sudo su -s /bin/bash -c './bin/cake passbolt cleanup' www-data
sudo su -s /bin/bash -c './bin/cake passbolt datacheck' www-data
Thank @Paulo1402 we'll have a look (PB-35980) For the avoidance of doubt can make sure you make sure the data is clean:
sudo su -s /bin/bash -c './bin/cake passbolt cleanup' www-data sudo su -s /bin/bash -c './bin/cake passbolt datacheck' www-data
Of course! I just ran these commands and didn't see anything wrong, all the data seems to be fine.
Hey @Paulo1402, we are able to reproduce the issue and working on the fix. We will update you once it gets released (ideally with v4.10).
Hey @Paulo1402, we are able to reproduce the issue and working on the fix. We will update you once it gets released (ideally with v4.10).
Thank you @ishanvyas22! I will be waiting for you guys!
Hey @Paulo1402, the fix for this issue has been released with v4.10.0 release. Closing the issue for now, feel free to reopen if issue persist.
Thank you for your patience.