refactor(twofactor_backupcodes): Replace security annotations with respective attributes

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/46820/head
provokateurin 2024-07-25 13:14:50 +07:00
parent 212a621697
commit c5c6517303
No known key found for this signature in database
1 changed files with 4 additions and 3 deletions

@ -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);