Skip to content

Commit 3d261e6

Browse files
authored
Merge pull request #48974 from nextcloud/backport/48788/stable28
[stable28] fix: add PasswordConfirmationRequired to the external storages mentioned in review
2 parents ea07104 + d8d72ca commit 3d261e6

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

apps/files_external/lib/Controller/GlobalStoragesController.php

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use OCA\Files_External\NotFoundException;
3131
use OCA\Files_External\Service\GlobalStoragesService;
3232
use OCP\AppFramework\Http;
33+
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
3334
use OCP\AppFramework\Http\DataResponse;
3435
use OCP\IConfig;
3536
use OCP\IGroupManager;
@@ -90,6 +91,7 @@ public function __construct(
9091
*
9192
* @return DataResponse
9293
*/
94+
#[PasswordConfirmationRequired]
9395
public function create(
9496
$mountPoint,
9597
$backend,
@@ -155,6 +157,7 @@ public function create(
155157
*
156158
* @return DataResponse
157159
*/
160+
#[PasswordConfirmationRequired]
158161
public function update(
159162
$id,
160163
$mountPoint,

apps/files_external/lib/Controller/StoragesController.php

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
use OCA\Files_External\Service\StoragesService;
3737
use OCP\AppFramework\Controller;
3838
use OCP\AppFramework\Http;
39+
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
3940
use OCP\AppFramework\Http\DataResponse;
4041
use OCP\Files\StorageNotAvailableException;
4142
use OCP\IConfig;
@@ -322,6 +323,7 @@ public function show($id, $testOnly = true) {
322323
*
323324
* @return DataResponse
324325
*/
326+
#[PasswordConfirmationRequired]
325327
public function destroy($id) {
326328
try {
327329
$this->service->removeStorage($id);

apps/files_external/lib/Controller/UserGlobalStoragesController.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
use OCA\Files_External\NotFoundException;
3636
use OCA\Files_External\Service\UserGlobalStoragesService;
3737
use OCP\AppFramework\Http;
38+
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
39+
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
3840
use OCP\AppFramework\Http\DataResponse;
3941
use OCP\IConfig;
4042
use OCP\IGroupManager;
@@ -155,9 +157,9 @@ public function show($id, $testOnly = true) {
155157
* @param bool $testOnly whether to storage should only test the connection or do more things
156158
*
157159
* @return DataResponse
158-
*
159-
* @NoAdminRequired
160160
*/
161+
#[NoAdminRequired]
162+
#[PasswordConfirmationRequired]
161163
public function update(
162164
$id,
163165
$backendOptions,

0 commit comments

Comments
 (0)