Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Nextcloud
server
Commits
68d3ffd1
Unverified
Commit
68d3ffd1
authored
Nov 20, 2018
by
Roeland Jago Douma
Browse files
Options
Downloads
Patches
Plain Diff
Handle permission in update of share better
Signed-off-by:
Roeland Jago Douma
<
roeland@famdouma.nl
>
parent
a7ea73c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files_sharing/lib/Controller/ShareAPIController.php
+4
-0
4 additions, 0 deletions
apps/files_sharing/lib/Controller/ShareAPIController.php
with
4 additions
and
0 deletions
apps/files_sharing/lib/Controller/ShareAPIController.php
+
4
−
0
View file @
68d3ffd1
...
...
@@ -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'
));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment