This removes all the read after write and we don't need to queries all
the time the same share in the same request anymore.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
The OCS endpoint expects either an int or an array for "shareType".
However, when using "getRowsHash()" only a single key is taken into
account, so instead of:
| shareType[] | 0 |
| shareType[] | 4 |
the share types are provided in a single row like:
| shareTypes | 0 4 |
and then converted to "shareType[]=0&shareType[]=4" when sending the
request.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This allows the admin to control the behavior whether link shares with
READ permissions should be extended to also gain SHARE permissions,
allowing users (public share receivers) to add the share to their cloud.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- Verify that explicitly sending empty `expireDate` param to server overwrite default
and sets not expiry date, if non is enforced.
- Update tests to avoid converting empty string to date.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Note that the "last link share can be downloaded" step was kept as it
tests the "url" property specific of link shares.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
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>
Now all incoming shares need to be explicitly accepted before being able
to use the shared file or get information about a reshare (although
getting the information of the incoming share is possible before
accepting it).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This will be needed to test scenarios in which updating a share return a
different HTTP status code, like 401.
The assertion for the 200 HTTP status code was added in those scenarios
that tested updating a share (that is, those that were also checking the
OCS status code), but not in those in which updating a share was just a
preparatory step for the actual test (in the same way that the HTTP
status code is not checked in those tests when creating a share).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>