mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Handle permission in update of share better
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
a7ea73c95a
commit
68d3ffd16c
1 changed files with 4 additions and 0 deletions
|
|
@ -680,6 +680,10 @@ class ShareAPIController extends OCSController {
|
|||
throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist'));
|
||||
}
|
||||
|
||||
if ($share->getShareOwner() !== $this->currentUser && $share->getSharedBy() !== $this->currentUser) {
|
||||
throw new OCSForbiddenException('You are not allowed to edit incomming shares');
|
||||
}
|
||||
|
||||
if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) {
|
||||
throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue