mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-10-07 10:28:55 +00:00
fix(api): log user id instead of email on cognito role sync (SEC-29)
Keep AuthResponse.Email unchanged so CodeQL alert 1 closes without altering the callback payload.
This commit is contained in:
parent
05d87b2e04
commit
f06ffb6fad
1 changed files with 2 additions and 2 deletions
|
|
@ -120,8 +120,8 @@ public class AuthController : ControllerBase
|
||||||
if (user.Role != role)
|
if (user.Role != role)
|
||||||
{
|
{
|
||||||
// Fix: API-M13 — log previous role on Cognito-synced role changes
|
// Fix: API-M13 — log previous role on Cognito-synced role changes
|
||||||
_logger.LogInformation("User {Email} role changed from {OldRole} to {NewRole} via Cognito sync",
|
_logger.LogInformation("User {UserId} role changed from {OldRole} to {NewRole} via Cognito sync",
|
||||||
user.Email, user.Role, role);
|
user.Id, user.Role, role);
|
||||||
user.Role = role;
|
user.Role = role;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue