feature: user list

This commit is contained in:
antv
2026-07-08 15:29:13 +07:00
parent 7d9ba527a3
commit e476c2768a
32 changed files with 1091 additions and 284 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ class AuthService implements AuthServiceInterface
// Log the user in manually
Auth::login($user);
$request->session()->regenerate();
if ($user->status != User::STATUS_ACTIVE) {
if ($user->status != config('constants.STATUS_ACTIVE')) {
Auth::logout();
return ['success' => false, 'error_key' => 'permission', 'error_msg' => 'Bạn không có quyền truy cập. Vui lòng liên hệ quản trị viên'];
}
@@ -37,11 +37,11 @@ class AuthService implements AuthServiceInterface
public function getRedirectRouteForUser(User $user): string
{
if ($user->role == User::ROLE_ADMIN) {
if ($user->role == config('constants.ROLE_ADMIN')) {
return route('admin.dashboard');
}
if ($user->first_login == User::FIRST_LOGIN_TRUE) {
if ($user->first_login == config('constants.FIRST_LOGIN_TRUE')) {
return route('user.change_password');
}