Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path and other information are not shown if a share does not have "read" permission #762

Closed
individual-it opened this issue Oct 28, 2020 · 4 comments
Labels
Category:Defect Existing functionality is not working as expected Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced Type:Bug

Comments

@individual-it
Copy link
Member

  1. create two folders
    curl -k -u richard:superfluidity -X MKCOL https://localhost:9200/remote.php/dav/files/richard/folder1
    curl -k -u richard:superfluidity -X MKCOL https://localhost:9200/remote.php/dav/files/richard/folder2
  2. share one with "update" and one with "update+read" permissions
    curl -k -u richard:superfluidity -X POST https://localhost:9200/ocs/v2.php/apps/files_sharing/api/v1/shares -d 'permissions=2&path=%2Ffolder1&shareType=0&shareWith=einstein' -H "Content-Type: application/x-www-form-urlencoded"
    curl -k -u richard:superfluidity -X POST https://localhost:9200/ocs/v2.php/apps/files_sharing/api/v1/shares -d 'permissions=3&path=%2Ffolder2&shareType=0&shareWith=einstein' -H "Content-Type: application/x-www-form-urlencoded"
  3. query for all received shares curl -k -u einstein:relativity 'https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json&shared_with_me=true&state=all' | jq

Current behaviour:

these fields are not filled when the read permission is not givien: path,item_type,mimetype,storage_id,item_source file_source file_target

{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": "OK"
    },
    "data": [
      {
        "id": "89c4eae8-329a-4cf2-b1e6-beee34d093c5",
        "share_type": 0,
        "uid_owner": "932b4540-8d16-481e-8ef4-588e4b6b151c",
        "displayname_owner": "Richard Feynman",
        "permissions": 2,
        "stime": 1603867232,
        "parent": "",
        "expiration": "",
        "token": "",
        "uid_file_owner": "932b4540-8d16-481e-8ef4-588e4b6b151c",
        "displayname_file_owner": "Richard Feynman",
        "additional_info_owner": "",
        "additional_info_file_owner": "",
        "state": 1,
        "path": "",
        "item_type": "",
        "mimetype": "",
        "storage_id": "",
        "storage": 0,
        "item_source": "",
        "file_source": "",
        "file_parent": "",
        "file_target": "",
        "share_with": "4c510ada-c86b-4815-8820-42cdf82c3d51",
        "share_with_displayname": "Albert Einstein",
        "share_with_additional_info": "",
        "mail_send": 0,
        "name": ""
      },
      {
        "id": "0f318fdc-6a91-4eb5-87d1-cc1e5d73258c",
        "share_type": 0,
        "uid_owner": "932b4540-8d16-481e-8ef4-588e4b6b151c",
        "displayname_owner": "Richard Feynman",
        "permissions": 3,
        "stime": 1603867237,
        "parent": "",
        "expiration": "",
        "token": "",
        "uid_file_owner": "932b4540-8d16-481e-8ef4-588e4b6b151c",
        "displayname_file_owner": "Richard Feynman",
        "additional_info_owner": "",
        "additional_info_file_owner": "",
        "state": 1,
        "path": "/folder2",
        "item_type": "folder",
        "mimetype": "httpd/unix-directory",
        "storage_id": "1284d238-aa92-42ce-bdc4-0b0000009157",
        "storage": 0,
        "item_source": "MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OmQ5YWUwMDBlLTI2ZDYtNGZhMi1iYjA2LWM0YWQzMDExM2JhNw==",
        "file_source": "MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OmQ5YWUwMDBlLTI2ZDYtNGZhMi1iYjA2LWM0YWQzMDExM2JhNw==",
        "file_parent": "",
        "file_target": "/folder2",
        "share_with": "4c510ada-c86b-4815-8820-42cdf82c3d51",
        "share_with_displayname": "Albert Einstein",
        "share_with_additional_info": "",
        "mail_send": 0,
        "name": ""
      }
    ]
  }
}

@refs
Copy link
Member

refs commented Jan 12, 2021

With the current master + default ocis storage I get the following response (sharing with Marie):

{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 100,
      "message": "OK"
    },
    "data": [
      {
        "id": "d0bd3fa7-e0ae-4b84-a0b5-4ab8ab3f0512",
        "share_type": 0,
        "uid_owner": "richard",
        "displayname_owner": "Richard Feynman",
        "permissions": 3,
        "stime": 1610456708,
        "parent": "",
        "expiration": "",
        "token": "",
        "uid_file_owner": "richard",
        "displayname_file_owner": "Richard Feynman",
        "additional_info_owner": "",
        "additional_info_file_owner": "",
        "state": 1,
        "path": "/folder2",
        "item_type": "folder",
        "mimetype": "httpd/unix-directory",
        "storage_id": "1284d238-aa92-42ce-bdc4-0b0000009157",
        "storage": 0,
        "item_source": "MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjY2MGI4Y2JiLTA0OTYtNDcwMy05MDE2LTI0YjI1NTZmNzAwNg==",
        "file_source": "MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjY2MGI4Y2JiLTA0OTYtNDcwMy05MDE2LTI0YjI1NTZmNzAwNg==",
        "file_parent": "",
        "file_target": "/folder2",
        "share_with": "marie",
        "share_with_displayname": "Marie Curie",
        "share_with_additional_info": "",
        "mail_send": 0,
        "name": ""
      }
    ]
  }
}

The other share remains unlisted. Could we close it? ping @individual-it

@individual-it
Copy link
Member Author

@refs is it correct that the share with permission 2 is not listed?

@refs
Copy link
Member

refs commented Jan 13, 2021

yes, at least I got that response back. Is it a known issue? Should it be listed? 🤔

@refs refs added Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced Category:Defect Existing functionality is not working as expected labels Jan 13, 2021
@settings settings bot removed the p3-medium label Apr 7, 2021
@kobergj
Copy link
Collaborator

kobergj commented Jun 3, 2024

Closing since there is no action since 2021

@kobergj kobergj closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Defect Existing functionality is not working as expected Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced Type:Bug
Projects
None yet
Development

No branches or pull requests

3 participants