Skip to content

Getting an specific share with a user as recipient doesn't return anything. #20582

Closed

Description

@SergioBertolinSG

Steps to reproduce

Having 'user0' and 'user1' as users.
'user1' belongs to group1.

  1. Using user0 share a file 'textfile.txt' with group1.
  2. Do
curl -X GET http://user0:user0@HOST/ocs/v1.php/apps/files_sharing/api/v1/shares

Get the share id of 'textfile.txt'.

  1. Using the share id you got, do:
curl -X GET http://user1:user1@HOST/ocs/v1.php/apps/files_sharing/api/v1/shares/share_id

Expected behaviour

Return a response code.

Actual behaviour

Nothing is answered. (internal error?)

Server configuration

Operating system:
Ubuntu 14.04

Web server:
Apache

Database:
MySQL

PHP version:
5.5.9

ownCloud version: (see ownCloud admin page)
{"installed":true,"maintenance":false,"version":"9.0.0.2","versionstring":"9.0 pre alpha","edition":"Enterprise"}

Happening also in master branch.

Updated from an older ownCloud or fresh install:
Fresh

List of activated apps:
Default in community edition.

The content of config/config.php:


Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption:
No

Server logs


cc @rullzer

Activity

  1. added this to the milestone on Nov 18, 2015
  2. rullzer commented on Nov 23, 2015

    @rullzer
    Contributor

    Yes this behaviour is well. undefined to say the least. Basically what we had so far:

    • ../shares list all shares by me
    • ../shares?shared_with_me=true list all shares with me
    • ../shares/<ID> get info of share with id by me

    Now I think the cleanest approach here would be to make sure that ../shares/<ID> would return also info for shares with me. So in the OCS endpoint we need to have a check that verifies if either the share is by me or to me.

    @DeepDiver1975 I assume that is fine as it is not breaking the API?

    However, I don't feel much for trying to add that to the existing code. Let me tackle that in sharing 2.0

  3. self-assigned this
    on Nov 23, 2015
  4. rullzer commented on Jan 27, 2016

    @rullzer
    Contributor

    This is fixed with the new sharing code.

  5. lock commented on Aug 6, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  6. locked as resolved and limited conversation to collaborators on Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions