27
27
use OCA \GroupFolders \Service \DelegationService ;
28
28
use OCA \GroupFolders \Service \FoldersFilter ;
29
29
use OCP \AppFramework \Http ;
30
+ use OCP \AppFramework \Http \Attribute \PasswordConfirmationRequired ;
30
31
use OCP \AppFramework \Http \DataResponse ;
31
32
use OCP \AppFramework \OCSController ;
32
33
use OCP \Files \IRootFolder ;
@@ -160,6 +161,7 @@ private function getRootFolderStorageId(): ?int {
160
161
* @RequireGroupFolderAdmin
161
162
* @NoAdminRequired
162
163
*/
164
+ #[PasswordConfirmationRequired]
163
165
public function addFolder (string $ mountpoint ): DataResponse {
164
166
$ id = $ this ->manager ->createFolder (trim ($ mountpoint ));
165
167
return new DataResponse (['id ' => $ id ]);
@@ -169,6 +171,7 @@ public function addFolder(string $mountpoint): DataResponse {
169
171
* @NoAdminRequired
170
172
* @RequireGroupFolderAdmin
171
173
*/
174
+ #[PasswordConfirmationRequired]
172
175
public function removeFolder (int $ id ): DataResponse {
173
176
$ response = $ this ->checkFolderExists ($ id );
174
177
if ($ response ) {
@@ -184,6 +187,7 @@ public function removeFolder(int $id): DataResponse {
184
187
* @NoAdminRequired
185
188
* @RequireGroupFolderAdmin
186
189
*/
190
+ #[PasswordConfirmationRequired]
187
191
public function setMountPoint (int $ id , string $ mountPoint ): DataResponse {
188
192
$ this ->manager ->setMountPoint ($ id , trim ($ mountPoint ));
189
193
return new DataResponse (['success ' => true ]);
@@ -193,6 +197,7 @@ public function setMountPoint(int $id, string $mountPoint): DataResponse {
193
197
* @NoAdminRequired
194
198
* @RequireGroupFolderAdmin
195
199
*/
200
+ #[PasswordConfirmationRequired]
196
201
public function addGroup (int $ id , string $ group ): DataResponse {
197
202
$ response = $ this ->checkFolderExists ($ id );
198
203
if ($ response ) {
@@ -206,6 +211,7 @@ public function addGroup(int $id, string $group): DataResponse {
206
211
* @NoAdminRequired
207
212
* @RequireGroupFolderAdmin
208
213
*/
214
+ #[PasswordConfirmationRequired]
209
215
public function removeGroup (int $ id , string $ group ): DataResponse {
210
216
$ response = $ this ->checkFolderExists ($ id );
211
217
if ($ response ) {
@@ -219,6 +225,7 @@ public function removeGroup(int $id, string $group): DataResponse {
219
225
* @NoAdminRequired
220
226
* @RequireGroupFolderAdmin
221
227
*/
228
+ #[PasswordConfirmationRequired]
222
229
public function setPermissions (int $ id , string $ group , int $ permissions ): DataResponse {
223
230
$ response = $ this ->checkFolderExists ($ id );
224
231
if ($ response ) {
@@ -233,6 +240,7 @@ public function setPermissions(int $id, string $group, int $permissions): DataRe
233
240
* @RequireGroupFolderAdmin
234
241
* @throws \OCP\DB\Exception
235
242
*/
243
+ #[PasswordConfirmationRequired]
236
244
public function setManageACL (int $ id , string $ mappingType , string $ mappingId , bool $ manageAcl ): DataResponse {
237
245
$ response = $ this ->checkFolderExists ($ id );
238
246
if ($ response ) {
@@ -246,6 +254,7 @@ public function setManageACL(int $id, string $mappingType, string $mappingId, bo
246
254
* @NoAdminRequired
247
255
* @RequireGroupFolderAdmin
248
256
*/
257
+ #[PasswordConfirmationRequired]
249
258
public function setQuota (int $ id , int $ quota ): DataResponse {
250
259
$ response = $ this ->checkFolderExists ($ id );
251
260
if ($ response ) {
@@ -259,6 +268,7 @@ public function setQuota(int $id, int $quota): DataResponse {
259
268
* @NoAdminRequired
260
269
* @RequireGroupFolderAdmin
261
270
*/
271
+ #[PasswordConfirmationRequired]
262
272
public function setACL (int $ id , bool $ acl ): DataResponse {
263
273
$ response = $ this ->checkFolderExists ($ id );
264
274
if ($ response ) {
@@ -272,6 +282,7 @@ public function setACL(int $id, bool $acl): DataResponse {
272
282
* @NoAdminRequired
273
283
* @RequireGroupFolderAdmin
274
284
*/
285
+ #[PasswordConfirmationRequired]
275
286
public function renameFolder (int $ id , string $ mountpoint ): DataResponse {
276
287
$ response = $ this ->checkFolderExists ($ id );
277
288
if ($ response ) {
0 commit comments