Skip to content

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

Closed

Description

@individual-it
  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": ""
      }
    ]
  }
}

Activity

  1. refs commented on Jan 12, 2021

    @refs
    Contributor

    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

  2. individual-it commented on Jan 13, 2021

    @individual-it
    MemberAuthor

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

  3. refs commented on Jan 13, 2021

    @refs
    Contributor

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

  4. added
    Interaction:Needs-help
    Category:Defect
    on Jan 13, 2021
  5. kobergj commented on Jun 3, 2024

    @kobergj
    Contributor

    Closing since there is no action since 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Category:DefectInteraction:Needs-helpType:Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions