diff options
author | yemkareems <yemkareems@gmail.com> | 2024-10-17 12:34:21 +0530 |
---|---|---|
committer | yemkareems <yemkareems@gmail.com> | 2024-10-17 12:34:21 +0530 |
commit | 7d36883da5079a203d577a65a8c302ba2d22261c (patch) | |
tree | d240f22f983824cfb7370e4c2e4013d99f43831c | |
parent | 603ad26307c348f23f5d1cf320982846a6a64986 (diff) | |
download | nextcloud-server-7d36883da5079a203d577a65a8c302ba2d22261c.tar.gz nextcloud-server-7d36883da5079a203d577a65a8c302ba2d22261c.zip |
fix: add PasswordConfirmationRequired to user storages create, update and delete
Signed-off-by: yemkareems <yemkareems@gmail.com>
-rw-r--r-- | apps/files_external/lib/Controller/UserStoragesController.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php index 7c141afcb30..f9e4ce648d4 100644 --- a/apps/files_external/lib/Controller/UserStoragesController.php +++ b/apps/files_external/lib/Controller/UserStoragesController.php @@ -41,6 +41,8 @@ use OCP\IL10N; 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 @@ class UserStoragesController extends StoragesController { * @param array $mountOptions backend-specific mount options * * @return DataResponse - * - * @NoAdminRequired */ + #[NoAdminRequired] + #[PasswordConfirmationRequired] public function create( $mountPoint, $backend, @@ -176,9 +178,9 @@ class UserStoragesController extends StoragesController { * @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 @@ class UserStoragesController extends StoragesController { /** * Delete storage * - * @NoAdminRequired - * * {@inheritdoc} */ + #[NoAdminRequired] + #[PasswordConfirmationRequired] public function destroy($id) { return parent::destroy($id); } |