Remove scanAll which relies on the "shareinfo" endpoint that returns the
full cache tree.
The latter can become big for big shares and result in timeouts.
Furthermode, the full tree would be retrieved again for each and every
detected change which can become expensive quickly.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
When deleting a user, we should only delete the direct remote user
shares or the remote group based subshares.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
When declining a remote group share through the dialog that appears when
notifications are off, the mount point is now correctly saved when
re-accepting.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Accepting and declining can now be done repeatedly on both the parent
group share and sub-share with the same effects.
Added unit tests to cover these cases, and also when the same operation
is repeated.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Fix pending shares endpoint to consider user-specific sub-entries
for group shares whenever a share was accepted or declined.
Added unit test for adding remote group shares.
Fixed "removeUserShares" to not send a remote request as we never send
remote requests for group shares.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>