[🐛 Bug]: Alert Self-Assign doesn't use the real username
Describe the bug Self-Assign doesn't use the real username, it assignes admin@keephq To Reproduce Steps to reproduce the behavior:
- Go to any alert
- Click on the alert
- In alert details click self-assign
- you'll see the user that was assigned is admin@keephq
Expected behavior Assignment of the user that clicked self-assign
Hey, @DolevNe! 👋 I'm here to help you with any bugs, questions, or contributions. Let's squash some bugs together!
The issue you're experiencing with the self-assign functionality assigning the email admin@keephq instead of the real username might be related to how the authenticated user's email is being retrieved or modified before reaching the self-assign functionality.
The self-assign feature uses the authenticated user's email to assign the incident. This is done in the assign_incident function, where the incident's assignee is set to the authenticated_entity.email [1]. If the email is not being set correctly, it could be due to a middleware or function that modifies the authenticated user's email before it reaches this point.
To troubleshoot this issue, you might want to check:
- How the
authenticated_entityis being populated and whether there is any middleware or function that could be altering the email toadmin@keephq. - The configuration or environment settings that might default the email to
admin@keephqif the actual user email is not available.
If you have access to the authentication logic or middleware, reviewing those parts of the code could help identify where the email might be getting incorrectly set.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other