Add support for room shares to the share manager

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>
This commit is contained in:
Daniel Calviño Sánchez 2018-06-29 10:40:02 +02:00
parent 4ee839d69c
commit d9458b303a
1 changed files with 1 additions and 0 deletions

View File

@ -239,6 +239,7 @@ class Manager implements IManager {
if ($circle === null) { if ($circle === null) {
throw new \InvalidArgumentException('SharedWith is not a valid circle'); throw new \InvalidArgumentException('SharedWith is not a valid circle');
} }
} else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_ROOM) {
} else { } else {
// We can't handle other types yet // We can't handle other types yet
throw new \InvalidArgumentException('unknown share type'); throw new \InvalidArgumentException('unknown share type');