From 834f0a0eba9e9b0999c85da3fa7e1cde5d5bfe8c Mon Sep 17 00:00:00 2001 From: yemkareems Date: Thu, 17 Oct 2024 12:38:06 +0530 Subject: [PATCH] fix: add PasswordConfirmationRequired to user storages create, update and delete Signed-off-by: yemkareems --- .../lib/Controller/UserStoragesController.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php index 7c141afcb305e..f9e4ce648d481 100644 --- a/apps/files_external/lib/Controller/UserStoragesController.php +++ b/apps/files_external/lib/Controller/UserStoragesController.php @@ -41,6 +41,8 @@ use OCP\IRequest; use OCP\IUserSession; use Psr\Log\LoggerInterface; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; /** * User storages controller @@ -120,9 +122,9 @@ public function show($id, $testOnly = true) { * @param array $mountOptions backend-specific mount options * * @return DataResponse - * - * @NoAdminRequired */ + #[NoAdminRequired] + #[PasswordConfirmationRequired] public function create( $mountPoint, $backend, @@ -176,9 +178,9 @@ public function create( * @param bool $testOnly whether to storage should only test the connection or do more things * * @return DataResponse - * - * @NoAdminRequired */ + #[NoAdminRequired] + #[PasswordConfirmationRequired] public function update( $id, $mountPoint, @@ -227,10 +229,10 @@ public function update( /** * Delete storage * - * @NoAdminRequired - * * {@inheritdoc} */ + #[NoAdminRequired] + #[PasswordConfirmationRequired] public function destroy($id) { return parent::destroy($id); }