The tests check an user share and a link share; there is a slight
difference in style between them as each one is based on the test above
it, which tests increasing reshare permissions.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The admin user is not deleted after each integration test is run, so
folders created by the admin user in one test are still there when the
next tests run; tests should be independent one from each other, so a
regular user that is created and deleted for each test should be used
instead.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The test just ensures that the controller will gracefully reject the
creation instead of failing miserably; the integration tests when Talk
is enabled are in the Talk repository.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the ownership of a user share is transfered to the receiver the
share is removed, as the receiver now owns the original file. However,
due to a missing condition, any share with a group, link or remote with
the same id as the user was removed, not only the user shares.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Add "PARENT (2)" and its subdirectories to the paths to be checked, as
before only the own "PARENT" folder was being checked, but not the
shared one.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When a file is shared and the receiver of the share already has a file
with the same name that file is left untouched, and "(2)" is appended to
the name of the shared file.
As "textfile0.txt" is included in the user folder skeleton all the users
in the integration test have that file, so when it is shared the
receiver sees the share as "/textfile0 (2).txt", and her own file as
"/textfile0.txt".
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The data directory is not necessarily located at "../..". The proper
directory is now got by running "php console.php config:system:get
datadirectory".
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Until now it was safe to assume that every file was readable by its
owner, so there was no need to return whether the file was readable or
not. However, with the introduction of end to end encryption that is no
longer the case, and it is now necessary to explicitly provide that
information.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Overrides \Sabre\DAV\Auth\Backend\AbstractBearer::challenge to prevent sending a second WWW-Authenticate header which is standard-compliant but most DAV clients simply fail hard.
Fixes https://github.com/nextcloud/server/issues/5088
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>