diff options
author | provokateurin <kate@provokateurin.de> | 2024-07-25 13:14:50 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-07-27 21:35:13 +0200 |
commit | c5c6517303dfa3faafcc13cfa9b8ffbf9cbbee18 (patch) | |
tree | 982926f0a60879c79918f2d35abb3cd72da0444c /apps/twofactor_backupcodes | |
parent | 212a621697cd32b65ea78fa90015cec9d9d1dfe3 (diff) | |
download | nextcloud-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.php | 7 |
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); |