Now that we accept shares we should show an overview of shares that are
pending. This first part is the small API to get a list of the currently
pending shares.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
add tests on non-owner pov
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
duplicate
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
small fixes
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
removed tags
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
working on users with resharing rights
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-getLogger()
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
cleaning
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
fix type
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Update SharingRightsException.php
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Geting first element of nodes array instead of element with key 0. In some cases key 0 not exists in this array ie. when file is shared from group folder with member of this group who have no permission to read this file.
Getting the shares of a file no longer returns shares with the current
user for consistency with the results when getting the shares including
subfiles.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"ShareManager::getSharesBy()" already checks if the share provider
exists before returning the shares and, if the provider does not exist,
it returns an empty array. Therefore it is not needed to explicitly
check if the provider exists or not.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
A user with reshare permissions on a file is now able to get any share
of that file (just like the owner).
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Before this change the node you shared was checked for permissions.
This works when you reshare the folder that was shared with you.
However when you reshared a subfolder (e.g. as public link),
you could afterwards update the permissions and grant
create+update permissions although the share you receive was read-only.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Due to legacy reasons the password of link shares was returned in the
"share_with" and "share_with_displayname" parameters of the response
data. Now a proper "password" parameter is returned too; the old
"share_with" and "share_with_displayname" parameters are kept, although
deprecated, and they will be removed in a future version of Nextcloud.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Fixes#10852
A quick hack. Still ensures some type safety however now also accepts
null. Else we'd need to add a whole new layer of middlewares.
This can only happen when a guest user wants to access a controller that
requries the user_id.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>