mirror of
https://github.com/nextcloud/server.git
synced 2026-03-09 01:40:53 -04:00
Merge pull request #45562 from nextcloud/fix-maintain-share-client-behaviour
fix(ShareApiClients): Maintain meaning of `''` and null for share api cli…
This commit is contained in:
commit
a7a055726e
1 changed files with 3 additions and 3 deletions
|
|
@ -775,19 +775,19 @@ class ShareAPIController extends OCSController {
|
|||
$share->setPermissions($permissions);
|
||||
} elseif ($shareType === IShare::TYPE_ROOM) {
|
||||
try {
|
||||
$this->getRoomShareHelper()->createShare($share, $shareWith, $permissions, $expireDate);
|
||||
$this->getRoomShareHelper()->createShare($share, $shareWith, $permissions, $expireDate ?? '');
|
||||
} catch (QueryException $e) {
|
||||
throw new OCSForbiddenException($this->l->t('Sharing %s failed because the back end does not support room shares', [$node->getPath()]));
|
||||
}
|
||||
} elseif ($shareType === IShare::TYPE_DECK) {
|
||||
try {
|
||||
$this->getDeckShareHelper()->createShare($share, $shareWith, $permissions, $expireDate);
|
||||
$this->getDeckShareHelper()->createShare($share, $shareWith, $permissions, $expireDate ?? '');
|
||||
} catch (QueryException $e) {
|
||||
throw new OCSForbiddenException($this->l->t('Sharing %s failed because the back end does not support room shares', [$node->getPath()]));
|
||||
}
|
||||
} elseif ($shareType === IShare::TYPE_SCIENCEMESH) {
|
||||
try {
|
||||
$this->getSciencemeshShareHelper()->createShare($share, $shareWith, $permissions, $expireDate);
|
||||
$this->getSciencemeshShareHelper()->createShare($share, $shareWith, $permissions, $expireDate ?? '');
|
||||
} catch (QueryException $e) {
|
||||
throw new OCSForbiddenException($this->l->t('Sharing %s failed because the back end does not support ScienceMesh shares', [$node->getPath()]));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue