mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
First step in improving test coverage.
This commit is contained in:
@@ -190,17 +190,10 @@ class ProfileController extends Controller
|
||||
/**
|
||||
* Enable 2FA screen.
|
||||
*
|
||||
* @param UserRepositoryInterface $repository
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
*/
|
||||
public function enable2FA(UserRepositoryInterface $repository)
|
||||
public function enable2FA()
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
if ($repository->hasRole($user, 'demo')) {
|
||||
return redirect(route('profile.index'));
|
||||
}
|
||||
$hasSecret = (null !== app('preferences')->get('twoFactorAuthSecret'));
|
||||
|
||||
// if we don't have a valid secret yet, redirect to the code page to get one.
|
||||
|
Reference in New Issue
Block a user