diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-11-18 15:42:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 15:42:30 +0100 |
commit | 332eaec4c01356d0b2119d4ec8fe07fa492d031b (patch) | |
tree | 3f89772129059801fd6768985aed9f7785a1791c /apps/twofactor_backupcodes/lib/Controller/SettingsController.php | |
parent | faee255ff47873ed2f8908c7d6b6e603ded11618 (diff) | |
parent | 3ffd9a755f60761d6a1f5fa3d02d07b4c2e68972 (diff) | |
download | nextcloud-server-332eaec4c01356d0b2119d4ec8fe07fa492d031b.tar.gz nextcloud-server-332eaec4c01356d0b2119d4ec8fe07fa492d031b.zip |
Merge pull request #1447 from nextcloud/password-confirmation-for-some-actions
Password confirmation for some actions
Diffstat (limited to 'apps/twofactor_backupcodes/lib/Controller/SettingsController.php')
-rw-r--r-- | apps/twofactor_backupcodes/lib/Controller/SettingsController.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php index fed7634643d..9b0b0fc57ba 100644 --- a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php +++ b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php @@ -59,15 +59,17 @@ class SettingsController extends Controller { /** * @NoAdminRequired + * @PasswordConfirmationRequired + * * @return JSONResponse */ public function createCodes() { $user = $this->userSession->getUser(); $codes = $this->storage->createCodes($user); - return [ - 'codes' => $codes, - 'state' => $this->storage->getBackupCodesState($user), - ]; + return new JSONResponse([ + 'codes' => $codes, + 'state' => $this->storage->getBackupCodesState($user), + ]); } } |