aboutsummaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-07-25 13:14:50 +0200
committerprovokateurin <kate@provokateurin.de>2024-07-27 21:35:13 +0200
commitc5c6517303dfa3faafcc13cfa9b8ffbf9cbbee18 (patch)
tree982926f0a60879c79918f2d35abb3cd72da0444c /apps/twofactor_backupcodes
parent212a621697cd32b65ea78fa90015cec9d9d1dfe3 (diff)
downloadnextcloud-server-c5c6517303dfa3faafcc13cfa9b8ffbf9cbbee18.tar.gz
nextcloud-server-c5c6517303dfa3faafcc13cfa9b8ffbf9cbbee18.zip
refactor(twofactor_backupcodes): Replace security annotations with respective attributes
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/twofactor_backupcodes')
-rw-r--r--apps/twofactor_backupcodes/lib/Controller/SettingsController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
index 007b18f9cd5..7982ce382c4 100644
--- a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
+++ b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
@@ -10,6 +10,8 @@ namespace OCA\TwoFactorBackupCodes\Controller;
use OCA\TwoFactorBackupCodes\Service\BackupCodeStorage;
use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\Attribute\NoAdminRequired;
+use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\IUserSession;
@@ -35,11 +37,10 @@ class SettingsController extends Controller {
}
/**
- * @NoAdminRequired
- * @PasswordConfirmationRequired
- *
* @return JSONResponse
*/
+ #[NoAdminRequired]
+ #[PasswordConfirmationRequired]
public function createCodes(): JSONResponse {
$user = $this->userSession->getUser();
$codes = $this->storage->createCodes($user);