Skip to content

Commit 6063ff7

Browse files
Merge pull request #3300 from nextcloud/fix/settings/config-handling-stable27
2 parents 08a5928 + 716c5c6 commit 6063ff7

File tree

5 files changed

+198
-161
lines changed

5 files changed

+198
-161
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

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

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"@nextcloud/stylelint-config": "^2.3.0",
2222
"@nextcloud/webpack-vue-config": "^5.5.1",
2323
"@types/bootstrap": "^5.2.6",
24-
"@types/jquery": "^3.5.16",
2524
"@types/react": "^17.0.43",
2625
"@types/react-dom": "^18.0.3",
2726
"@types/webpack": "^4.41.26",
@@ -39,6 +38,7 @@
3938
"@nextcloud/event-bus": "^3.0.2",
4039
"@nextcloud/files": "^3.0.0-beta.9",
4140
"@nextcloud/l10n": "^2.1.0",
41+
"@nextcloud/password-confirmation": "4.0.4",
4242
"@nextcloud/router": "^2.1.1",
4343
"@nextcloud/vue": "^7.11.4",
4444
"nextcloud-server": "^0.15.10",

0 commit comments

Comments
 (0)