diff options
author | yemkareems <yemkareems@gmail.com> | 2024-10-18 14:04:34 +0530 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-10-29 11:08:33 +0000 |
commit | 8739a0add631c0f1f56f8c75a24d24a887f6216f (patch) | |
tree | abb251b2d6997f000c17b95d8fc10b6a78afff66 /apps | |
parent | a9dd34ab35d9bf160a6d9d98de50192b342fa16b (diff) | |
download | nextcloud-server-8739a0add631c0f1f56f8c75a24d24a887f6216f.tar.gz nextcloud-server-8739a0add631c0f1f56f8c75a24d24a887f6216f.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 d773f3ea5e2..fc296cb3d4e 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 fd004b49b37..bc660cd580c 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -14,6 +14,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; @@ -300,6 +301,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 3d364fff57d..c35387de4e9 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, |