Skip to content

Commit 716c5c6

Browse files
committed
fix(settings): Fix config handling
Signed-off-by: provokateurin <[email protected]>
1 parent ce1d0e9 commit 716c5c6

File tree

4 files changed

+161
-40
lines changed

4 files changed

+161
-40
lines changed

β€Žlib/Controller/FolderController.php

+11
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use OCA\GroupFolders\Service\DelegationService;
2828
use OCA\GroupFolders\Service\FoldersFilter;
2929
use OCP\AppFramework\Http;
30+
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
3031
use OCP\AppFramework\Http\DataResponse;
3132
use OCP\AppFramework\OCSController;
3233
use OCP\Files\IRootFolder;
@@ -160,6 +161,7 @@ private function getRootFolderStorageId(): ?int {
160161
* @RequireGroupFolderAdmin
161162
* @NoAdminRequired
162163
*/
164+
#[PasswordConfirmationRequired]
163165
public function addFolder(string $mountpoint): DataResponse {
164166
$id = $this->manager->createFolder(trim($mountpoint));
165167
return new DataResponse(['id' => $id]);
@@ -169,6 +171,7 @@ public function addFolder(string $mountpoint): DataResponse {
169171
* @NoAdminRequired
170172
* @RequireGroupFolderAdmin
171173
*/
174+
#[PasswordConfirmationRequired]
172175
public function removeFolder(int $id): DataResponse {
173176
$response = $this->checkFolderExists($id);
174177
if ($response) {
@@ -184,6 +187,7 @@ public function removeFolder(int $id): DataResponse {
184187
* @NoAdminRequired
185188
* @RequireGroupFolderAdmin
186189
*/
190+
#[PasswordConfirmationRequired]
187191
public function setMountPoint(int $id, string $mountPoint): DataResponse {
188192
$this->manager->setMountPoint($id, trim($mountPoint));
189193
return new DataResponse(['success' => true]);
@@ -193,6 +197,7 @@ public function setMountPoint(int $id, string $mountPoint): DataResponse {
193197
* @NoAdminRequired
194198
* @RequireGroupFolderAdmin
195199
*/
200+
#[PasswordConfirmationRequired]
196201
public function addGroup(int $id, string $group): DataResponse {
197202
$response = $this->checkFolderExists($id);
198203
if ($response) {
@@ -206,6 +211,7 @@ public function addGroup(int $id, string $group): DataResponse {
206211
* @NoAdminRequired
207212
* @RequireGroupFolderAdmin
208213
*/
214+
#[PasswordConfirmationRequired]
209215
public function removeGroup(int $id, string $group): DataResponse {
210216
$response = $this->checkFolderExists($id);
211217
if ($response) {
@@ -219,6 +225,7 @@ public function removeGroup(int $id, string $group): DataResponse {
219225
* @NoAdminRequired
220226
* @RequireGroupFolderAdmin
221227
*/
228+
#[PasswordConfirmationRequired]
222229
public function setPermissions(int $id, string $group, int $permissions): DataResponse {
223230
$response = $this->checkFolderExists($id);
224231
if ($response) {
@@ -233,6 +240,7 @@ public function setPermissions(int $id, string $group, int $permissions): DataRe
233240
* @RequireGroupFolderAdmin
234241
* @throws \OCP\DB\Exception
235242
*/
243+
#[PasswordConfirmationRequired]
236244
public function setManageACL(int $id, string $mappingType, string $mappingId, bool $manageAcl): DataResponse {
237245
$response = $this->checkFolderExists($id);
238246
if ($response) {
@@ -246,6 +254,7 @@ public function setManageACL(int $id, string $mappingType, string $mappingId, bo
246254
* @NoAdminRequired
247255
* @RequireGroupFolderAdmin
248256
*/
257+
#[PasswordConfirmationRequired]
249258
public function setQuota(int $id, int $quota): DataResponse {
250259
$response = $this->checkFolderExists($id);
251260
if ($response) {
@@ -259,6 +268,7 @@ public function setQuota(int $id, int $quota): DataResponse {
259268
* @NoAdminRequired
260269
* @RequireGroupFolderAdmin
261270
*/
271+
#[PasswordConfirmationRequired]
262272
public function setACL(int $id, bool $acl): DataResponse {
263273
$response = $this->checkFolderExists($id);
264274
if ($response) {
@@ -272,6 +282,7 @@ public function setACL(int $id, bool $acl): DataResponse {
272282
* @NoAdminRequired
273283
* @RequireGroupFolderAdmin
274284
*/
285+
#[PasswordConfirmationRequired]
275286
public function renameFolder(int $id, string $mountpoint): DataResponse {
276287
$response = $this->checkFolderExists($id);
277288
if ($response) {

β€Žpackage-lock.json

+128-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žpackage.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@nextcloud/event-bus": "^3.0.2",
3939
"@nextcloud/files": "^3.0.0-beta.9",
4040
"@nextcloud/l10n": "^2.1.0",
41+
"@nextcloud/password-confirmation": "4.0.4",
4142
"@nextcloud/router": "^2.1.1",
4243
"@nextcloud/vue": "^7.11.4",
4344
"nextcloud-server": "^0.15.10",

0 commit comments

Comments
Β (0)