reva: Member in a group cannot see the share which has been shared with the group

Description:

When a sharer shares a file with a group, the user in the group cannot find the share in the list of pending shares, or the shares in any state.

Steps to reproduce:

  1. Create users Alice and user Brian
  2. Add user Brian to group grp1
  3. As user Alice, share a file textfile0.txt with group grp1
  4. As user Alice, get all the shares shared by the user as follows:
curl -X GET http://localhost:20080/ocs/v1.php/apps/files_sharing/api/v1/shares -H OCS_APIREQUEST=true -u Alice:123456 | xmllint --format -


<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
  </meta>
  <data>
    <element>
      <id>8</id>
      <share_type>1</share_type>
      <uid_owner>Alice</uid_owner>
      <displayname_owner>Alice Hansen</displayname_owner>
      <additional_info_owner>alice@example.org</additional_info_owner>
      <permissions>19</permissions>
      <stime>1624869903</stime>
      <parent/>
      <expiration/>
      <token/>
      <uid_file_owner>Alice</uid_file_owner>
      <displayname_file_owner>Alice Hansen</displayname_file_owner>
      <additional_info_file_owner>alice@example.org</additional_info_file_owner>
      <state>0</state>
      <path>/textfile0.txt</path>
      <item_type>file</item_type>
      <mimetype>text/plain</mimetype>
      <storage_id>123e4567-e89b-12d3-a456-426655440000!0cfb1e45-2623-4ccf-be1b-d9f0075ae5d3</storage_id>
      <storage>0</storage>
      <item_source>MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjU1NDQwMDAwOjBjZmIxZTQ1LTI2MjMtNGNjZi1iZTFiLWQ5ZjAwNzVhZTVkMw==</item_source>
      <file_source>MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjU1NDQwMDAwOjBjZmIxZTQ1LTI2MjMtNGNjZi1iZTFiLWQ5ZjAwNzVhZTVkMw==</file_source>
      <file_parent/>
      <file_target>/textfile0.txt</file_target>
      <share_with>grp1</share_with>
      <share_with_displayname>grp1</share_with_displayname>
      <share_with_additional_info/>
      <mail_send>0</mail_send>
      <name/>
    </element>
  </data>
</ocs>

  1. As user Brian, get all the shares shared with the user:
curl -X GET http://localhost:20080/ocs/v1.php/apps/files_sharing/api/v1/shares\?format\=json\&shared_with_me\=true\&state\=all -H OCS_APIREQUEST=true -u Brian:1234 -v;

 HTTP/1.1 200 OK
{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK"},"data":[]}}%    

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

My bad. The template is applied to UserId not User. (&(objectclass=posixGroup)(cn=*)(memberuid={{.OpaqueId}})) should work. Can you try that @jasson99?

@jasson99 can you try setting groupfilter (https://github.com/cs3org/reva/blob/master/tests/oc-integration-tests/local/ldap-users.toml#L37) to (&(objectclass=posixGroup)(cn=*)(memberuid={{.Username}}))?