Skip to content

Commit

Permalink
refactor(twofactor_backupcodes): Replace security annotations with re…
Browse files Browse the repository at this point in the history
…spective attributes

Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin committed Jul 27, 2024
1 parent 212a621 commit c29c459
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

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;
Expand All @@ -35,11 +37,10 @@ public function __construct($appName, IRequest $request, BackupCodeStorage $stor
}

/**
* @NoAdminRequired
* @PasswordConfirmationRequired
*
* @return JSONResponse
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired]
public function createCodes(): JSONResponse {
$user = $this->userSession->getUser();
$codes = $this->storage->createCodes($user);
Expand Down

0 comments on commit c29c459

Please sign in to comment.