Skip to content

Commit

Permalink
Merge pull request #2251 from nextcloud/backport/2250/stable14
Browse files Browse the repository at this point in the history
[stable14] fix(FoldersController): Refactor addToFolder
  • Loading branch information
marcelklehr authored Dec 24, 2024
2 parents d6b07c2 + 552ea54 commit 97c2075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/FoldersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function getFolder($folderId): JSONResponse {
* @throws UnauthenticatedError
*/
public function addToFolder($folderId, $bookmarkId): JSONResponse {
if (!Authorizer::hasPermission(Authorizer::PERM_WRITE, $this->authorizer->getPermissionsForFolder($folderId, $this->request)) &&
if (!Authorizer::hasPermission(Authorizer::PERM_WRITE, $this->authorizer->getPermissionsForFolder($folderId, $this->request)) ||
!Authorizer::hasPermission(Authorizer::PERM_EDIT, $this->authorizer->getPermissionsForBookmark($bookmarkId, $this->request))) {
$res = new JSONResponse(['status' => 'error', 'data' => ['Not found']], Http::STATUS_NOT_FOUND);
$res->throttle();
Expand Down

0 comments on commit 97c2075

Please sign in to comment.