If a file is on external storage there is no owner. WHich means we can't
check. So just return an empty array then.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
log the error in case a notification mail of a new share couldn't
be send to the recipient and finish the share operation successfully
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Tokens will be used to give access to a share to guests in public rooms.
Although the token itself is created in the provider of room shares and
no changes are needed for that, due to the code structure it is
necessary to explicitly call the provider from the manager when getting
a room share by token.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Room shares are implemented in an external app (Nextcloud Talk), so in
order to keep the share manager as isolated as possible from room share
specifics all the validity checks are done in the provider of room
shares. However, due to the code structure it is necessary to explicitly
check for room shares in "generalCreateChecks" to prevent an exception
from being thrown.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When a password was set for a mail share an e-mail was sent to the
recipient with the password. Now the e-mail is no longer sent if the
password is meant to be sent by Talk.
However, before the e-mail was not sent when the share was updated but
the password was not changed. Now an e-mail is sent in that case too if
switching from a password sent by Talk to a password sent by mail.
On the other hand, when switching from a password sent by mail to a
password sent by Talk it is mandatory to change the password; otherwise
the recipient would already have access to the share without having to
call the sharer to verify her identity.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When a group share is deleted we keep track of this in the DB.
Right now it is only possible for a recipient to get back the share by
asking the sharer to delete it and to share it again. This doesn't
scale.
This endpoint makes it possible to get back the share.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Otherwise its a normal string[] with the user ids, in that
case the array_merge did it's job just fine, apart from it
not being deduplicated.
The array+array is only needed when the user id is the key,
so integer only user ids are kept as they are instead of being
reindexed.
Regression from 3820d6883d
Signed-off-by: Joas Schilling <coding@schilljs.com>
This adds back the support for `\OCP\Share\IShare::getMailSend`, one example is creating bulk shares via API which where previously blocking due to the share notification emails.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* introduce a Controller for requests
* introduce result sorting mechanism
* extend Comments to retrieve commentors (actors) in a tree
* add commenters sorter
* add share recipients sorter
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Basically we did in almost all cases did a query to much.
This resulted in an extra query for each share type.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Now listeners for those events get proper share objects.
* Legacy hooks still fired
* Updated tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This is broken and will never work as the phan CI step pointed out.
Pro-tip of the day: Check why CI fails before merging 🙈
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
- This kind of hook signal used to be emitted in the old Share library but it was missing from Share 2.0
Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>