mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #46820 from nextcloud/refactor/twofactor_backupcodes/security-attributes
This commit is contained in:
commit
69a203d262
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue