diff options
author | yemkareems <yemkareems@gmail.com> | 2024-10-18 14:04:34 +0530 |
---|---|---|
committer | yemkareems <yemkareems@gmail.com> | 2024-10-18 14:04:34 +0530 |
commit | 18c0c28bce86b01c4c626b7c02312fb50757a5df (patch) | |
tree | 00ca5bee88ce113f14b941e1154d3d14a767252d /apps | |
parent | 4100f583f03464978e622f5765bbef33e363c97f (diff) | |
download | nextcloud-server-18c0c28bce86b01c4c626b7c02312fb50757a5df.tar.gz nextcloud-server-18c0c28bce86b01c4c626b7c02312fb50757a5df.zip |
fix: add PasswordConfirmationRequired to the eternal storages mentioned in review
Signed-off-by: yemkareems <yemkareems@gmail.com>
Diffstat (limited to 'apps')
3 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php index 05cfd4684d8..85d765d268b 100644 --- a/apps/files_external/lib/Controller/GlobalStoragesController.php +++ b/apps/files_external/lib/Controller/GlobalStoragesController.php @@ -9,6 +9,7 @@ namespace OCA\Files_External\Controller; 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; @@ -69,6 +70,7 @@ class GlobalStoragesController extends StoragesController { * * @return DataResponse */ + #[PasswordConfirmationRequired] public function create( $mountPoint, $backend, @@ -134,6 +136,7 @@ class GlobalStoragesController extends StoragesController { * * @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 9144b766d5d..acd4446cde6 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -15,6 +15,7 @@ use OCA\Files_External\NotFoundException; 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; @@ -301,6 +302,7 @@ abstract class StoragesController extends Controller { * * @return DataResponse */ + #[PasswordConfirmationRequired] public function destroy($id) { try { $this->service->removeStorage($id); diff --git a/apps/files_external/lib/Controller/UserGlobalStoragesController.php b/apps/files_external/lib/Controller/UserGlobalStoragesController.php index 60159e1bc54..bcb439a7357 100644 --- a/apps/files_external/lib/Controller/UserGlobalStoragesController.php +++ b/apps/files_external/lib/Controller/UserGlobalStoragesController.php @@ -15,6 +15,7 @@ use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\NotFoundException; use OCA\Files_External\Service\UserGlobalStoragesService; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\DataResponse; use OCP\IConfig; @@ -136,6 +137,7 @@ class UserGlobalStoragesController extends StoragesController { * @return DataResponse */ #[NoAdminRequired] + #[PasswordConfirmationRequired] public function update( $id, $backendOptions, |