aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryemkareems <yemkareems@gmail.com>2024-10-29 18:36:58 +0530
committerGitHub <noreply@github.com>2024-10-29 18:36:58 +0530
commitc5a15be4eab6c12350d684d559af9c09e6bfeaa0 (patch)
tree523392925a78ac6ac1d294a7b4423a2515ffd042
parenta9dd34ab35d9bf160a6d9d98de50192b342fa16b (diff)
parentb9b23a76c9e0b8ba20d859b50771d05fd15875df (diff)
downloadnextcloud-server-c5a15be4eab6c12350d684d559af9c09e6bfeaa0.tar.gz
nextcloud-server-c5a15be4eab6c12350d684d559af9c09e6bfeaa0.zip
Merge pull request #48976 from nextcloud/backport/48788/stable30
[stable30] fix: add PasswordConfirmationRequired to the external storages mentioned in review
-rw-r--r--apps/files_external/lib/Controller/GlobalStoragesController.php3
-rw-r--r--apps/files_external/lib/Controller/StoragesController.php2
-rw-r--r--apps/files_external/lib/Controller/UserGlobalStoragesController.php2
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..73c793d2df7 100644
--- a/apps/files_external/lib/Controller/UserGlobalStoragesController.php
+++ b/apps/files_external/lib/Controller/UserGlobalStoragesController.php
@@ -16,6 +16,7 @@ use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\UserGlobalStoragesService;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
+use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\IConfig;
use OCP\IGroupManager;
@@ -136,6 +137,7 @@ class UserGlobalStoragesController extends StoragesController {
* @return DataResponse
*/
#[NoAdminRequired]
+ #[PasswordConfirmationRequired]
public function update(
$id,
$backendOptions,