mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Add specific route for disabling 2FA
This commit is contained in:
parent
c2a7866709
commit
ec6bf52b43
@ -71,4 +71,12 @@ class TwoFactorController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function disableTwoFactor()
|
||||
{
|
||||
$user = auth()->user();
|
||||
$user->google_2fa_secret = null;
|
||||
$user->save();
|
||||
|
||||
return $this->itemResponse($user);
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
'custom_value3',
|
||||
'custom_value4',
|
||||
'is_deleted',
|
||||
'google_2fa_secret',
|
||||
// 'google_2fa_secret',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -252,6 +252,7 @@ class HtmlEngine
|
||||
$data['$client.address2'] = &$data['$address2'];
|
||||
$data['$client_address'] = ['value' => $this->client->present()->address() ?: ' ', 'label' => ctrans('texts.address')];
|
||||
$data['$client.address'] = &$data['$client_address'];
|
||||
$data['$client.postal_code'] = $this->client->postal_code;
|
||||
$data['$client.id_number'] = &$data['$id_number'];
|
||||
$data['$client.vat_number'] = &$data['$vat_number'];
|
||||
$data['$client.website'] = &$data['$website'];
|
||||
|
@ -163,6 +163,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
||||
|
||||
Route::get('settings/enable_two_factor', 'TwoFactorController@setupTwoFactor');
|
||||
Route::post('settings/enable_two_factor', 'TwoFactorController@enableTwoFactor');
|
||||
Route::post('settings/disable_two_factor', 'TwoFactorController@disableTwoFactor');
|
||||
|
||||
Route::resource('vendors', 'VendorController'); // name = (vendors. index / create / show / update / destroy / edit
|
||||
Route::post('vendors/bulk', 'VendorController@bulk')->name('vendors.bulk');
|
||||
|
Loading…
Reference in New Issue
Block a user