We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 83cc75c + bc78b5f commit 7acb239Copy full SHA for 7acb239
lib/Controller/LockingController.php
@@ -90,6 +90,10 @@ public function lockFolder(int $id): DataResponse {
90
throw new OCSForbiddenException($this->l10n->t('You are not allowed to create the lock'));
91
}
92
93
+ if ($userFolder->getId() === $id) {
94
+ throw new OCSForbiddenException($this->l10n->t('You are not allowed to lock the root'));
95
+ }
96
+
97
$nodes = $userFolder->getById($id);
98
if (!isset($nodes[0]) || !$nodes[0] instanceof Folder) {
99
0 commit comments