refactor(auth): remove role-based logic from scanner authentication and permissions
This commit is contained in:
@@ -78,7 +78,6 @@ class PasswordLoginService
|
||||
string $password,
|
||||
?string $ipAddress,
|
||||
?string $userAgent,
|
||||
RoleCode $role = RoleCode::Scanner,
|
||||
): User {
|
||||
return $this->authenticateUser(
|
||||
$email,
|
||||
@@ -86,12 +85,10 @@ class PasswordLoginService
|
||||
null,
|
||||
$ipAddress,
|
||||
$userAgent,
|
||||
$role,
|
||||
RoleCode::Scanner,
|
||||
true,
|
||||
PermissionCode::ScanTickets->value,
|
||||
$role === RoleCode::AdminApp
|
||||
? PasswordResetRequested::CHANNEL_ADMINAPP
|
||||
: PasswordResetRequested::CHANNEL_SCANNER,
|
||||
PasswordResetRequested::CHANNEL_SCANNER,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user