A227b new admin features (#388)
* wip: adminfeatures * wip: admin features * wip: admin features, password reset, deleted forms * fix linting * fix pinting * fix bug * fix bug * remove testing * fixes on deleted forms, removed unused functions * fix pint * admin feature updated * fix linting warning * fix workspace subscription tag * Final touches * Clean console.log * Added admin logs * Fix linting --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -25,17 +25,19 @@ class ImpersonationController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
\Log::warning(AdminController::ADMIN_LOG_PREFIX . 'Impersonation started', [
|
||||
AdminController::log('Impersonation started', [
|
||||
'from_id' => auth()->id(),
|
||||
'from_email' => auth()->user()->email,
|
||||
'target_id' => $user->id,
|
||||
'target_email' => $user->id,
|
||||
]);
|
||||
|
||||
$token = auth()->claims(auth()->user()->admin ? [] : [
|
||||
'impersonating' => true,
|
||||
'impersonator_id' => auth()->id(),
|
||||
])->login($user);
|
||||
$token = auth()->claims(
|
||||
auth()->user()->admin ? [] : [
|
||||
'impersonating' => true,
|
||||
'impersonator_id' => auth()->id(),
|
||||
]
|
||||
)->login($user);
|
||||
|
||||
return $this->success([
|
||||
'token' => $token,
|
||||
|
||||
Reference in New Issue
Block a user