owncloud / owncloud-sdk

:cloud: ownCloud client library for JavaScript
https://owncloud.dev/owncloud-sdk/
MIT License
75 stars 33 forks source link

Shared_with_me returns also files shared from me #321

Open LukasHirt opened 5 years ago

LukasHirt commented 5 years ago

Description

When doing call getShares('', { reshares: true, shared_with_me: true }) between the results are also mixed some files shared with others. Not all of them though. Tried if it's not when the file is reshared but that has no influence.

Network response

Right one

<element>
   <id>180</id>
   <share_type>0</share_type>
   <uid_owner>bob</uid_owner>
   <displayname_owner>bob</displayname_owner>
   <permissions>1</permissions>
   <stime>1565362131</stime>
   <parent/>
   <expiration/>
   <token/>
   <uid_file_owner>admin</uid_file_owner>
   <displayname_file_owner>admin</displayname_file_owner>
   <path>/created.md</path>
   <item_type>file</item_type>
   <mimetype>text/markdown</mimetype>
   <storage_id>shared::/created.md</storage_id>
   <storage>1</storage>
   <item_source>31696</item_source>
   <file_source>31696</file_source>
   <file_parent>41</file_parent>
   <file_target>/created.md</file_target>
   <share_with>alice</share_with>
   <share_with_displayname>alice</share_with_displayname>
   <share_with_additional_info/>
   <mail_send>0</mail_send>
   <attributes/>
  </element>

Bad one

<element>
   <id>170</id>
   <share_type>0</share_type>
   <uid_owner>bob</uid_owner>
   <displayname_owner>bob</displayname_owner>
   <permissions>19</permissions>
   <stime>1565103570</stime>
   <parent/>
   <expiration/>
   <token/>
   <uid_file_owner>bob</uid_file_owner>
   <displayname_file_owner>bob</displayname_file_owner>
   <path>/ownCloud Manual.pdf</path>
   <item_type>file</item_type>
   <mimetype>application/pdf</mimetype>
   <storage_id>home::bob</storage_id>
   <storage>3</storage>
   <item_source>42</item_source>
   <file_source>42</file_source>
   <file_parent>41</file_parent>
   <file_target>/ownCloud Manual (2).pdf</file_target>
   <share_with>admin</share_with>
   <share_with_displayname>admin</share_with_displayname>
   <share_with_additional_info/>
   <mail_send>0</mail_send>
   <attributes/>
  </element>
butonic commented 3 years ago

@LukasHirt this smells like an ocis server issue duplicate ...

LukasHirt commented 3 years ago

this smells like an ocis server issue duplicate ...

This was happening also with ownCloud 10 server. That's why I originally opened the ticket here.