Skip to content
Snippets Groups Projects
Unverified Commit 68d3ffd1 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Handle permission in update of share better

parent a7ea73c9
No related branches found
No related tags found
No related merge requests found
......@@ -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'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment