Skip to content

Commit

Permalink
Merge pull request #46820 from nextcloud/refactor/twofactor_backupcod…
Browse files Browse the repository at this point in the history
…es/security-attributes
  • Loading branch information
provokateurin authored Jul 28, 2024
2 parents e564bc9 + c5c6517 commit 69a203d
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 69a203d

Please sign in to comment.