From 5b422c667b8f63daf6e9cb8ee028f70cf5d9489e Mon Sep 17 00:00:00 2001 From: yemkareems Date: Fri, 18 Oct 2024 14:04:34 +0530 Subject: [PATCH] fix: add PasswordConfirmationRequired to the eternal storages mentioned in review Signed-off-by: yemkareems --- .../files_external/lib/Controller/GlobalStoragesController.php | 3 +++ apps/files_external/lib/Controller/StoragesController.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php index 2630fcc365a33..c493b060b139f 100644 --- a/apps/files_external/lib/Controller/GlobalStoragesController.php +++ b/apps/files_external/lib/Controller/GlobalStoragesController.php @@ -30,6 +30,7 @@ use OCA\Files_External\NotFoundException; use OCA\Files_External\Service\GlobalStoragesService; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; use OCP\AppFramework\Http\DataResponse; use OCP\IConfig; use OCP\IGroupManager; @@ -90,6 +91,7 @@ public function __construct( * * @return DataResponse */ + #[PasswordConfirmationRequired] public function create( $mountPoint, $backend, @@ -155,6 +157,7 @@ public function create( * * @return DataResponse */ + #[PasswordConfirmationRequired] public function update( $id, $mountPoint, diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index c8eda8658eff9..b5d5b9027ee9a 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -37,6 +37,7 @@ use OCA\Files_External\Service\StoragesService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; use OCP\AppFramework\Http\DataResponse; use OCP\Files\StorageNotAvailableException; use OCP\IConfig; @@ -387,6 +388,7 @@ public function show($id, $testOnly = true) { * * @return DataResponse */ + #[PasswordConfirmationRequired] public function destroy($id) { try { $this->service->removeStorage($id);