From bf72177e3c2d50711f08b2395916c71bc128aa5a Mon Sep 17 00:00:00 2001 From: yemkareems Date: Wed, 30 Oct 2024 17:17:29 +0530 Subject: [PATCH] fix: resolve conflict add PasswordConfirmationRequired to saveGlobalCredentials Signed-off-by: yemkareems --- apps/files_external/lib/Controller/AjaxController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/files_external/lib/Controller/AjaxController.php b/apps/files_external/lib/Controller/AjaxController.php index 7491eb846d450..aff72e1d02511 100644 --- a/apps/files_external/lib/Controller/AjaxController.php +++ b/apps/files_external/lib/Controller/AjaxController.php @@ -31,6 +31,8 @@ use OCA\Files_External\Lib\Auth\Password\GlobalAuth; use OCA\Files_External\Lib\Auth\PublicKey\RSA; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; use OCP\AppFramework\Http\JSONResponse; use OCP\IGroupManager; use OCP\IRequest; @@ -97,13 +99,13 @@ public function getSshKeys($keyLength = 1024) { } /** - * @NoAdminRequired - * * @param string $uid * @param string $user * @param string $password * @return bool */ + #[NoAdminRequired] + #[PasswordConfirmationRequired] public function saveGlobalCredentials($uid, $user, $password) { $currentUser = $this->userSession->getUser(); if ($currentUser === null) {