refactor(auth): remove role-based logic from scanner authentication and permissions

This commit is contained in:
2026-09-04 15:33:01 -03:00
parent 2feca2bed5
commit a4b5c2eb19
12 changed files with 213 additions and 89 deletions

View File

@@ -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,
);
}