Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(users): fix /users/me behavior when having more than 1 users in the same tenant #6284

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

vicferpoy
Copy link
Member

Context

We were retrieving the first user ordered by memberships in the GET /users/me endpoint, leading to incorrect behavior when having more than user in the same tenant.

Description

It has been fixed to properly return the requesting user info.

User1 info

image

User2 info

image

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vicferpoy vicferpoy added the backport-to-v5.0 Backport PR to the v5.0 branch label Dec 20, 2024
@vicferpoy vicferpoy requested a review from a team as a code owner December 20, 2024 12:49
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.72%. Comparing base (3057aee) to head (162931f).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6284      +/-   ##
==========================================
+ Coverage   90.10%   93.72%   +3.61%     
==========================================
  Files        1182       63    -1119     
  Lines       36300     6163   -30137     
==========================================
- Hits        32708     5776   -26932     
+ Misses       3592      387    -3205     
Flag Coverage Δ
api 93.72% <96.29%> (?)
prowler ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler ∅ <ø> (∅)
api 93.72% <96.29%> (∅)

Copy link
Contributor

@AdriiiPRodri AdriiiPRodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MrCloudSec MrCloudSec merged commit ea13241 into master Dec 20, 2024
13 checks passed
@MrCloudSec MrCloudSec deleted the PRWLR-5847-incorrect-user-when-calling-endpoint-me branch December 20, 2024 14:01
@prowler-bot
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
v5.0

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@prowler-bot prowler-bot added the was-backported The PR was successfully backported to the target branch label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v5.0 Backport PR to the v5.0 branch component/api was-backported The PR was successfully backported to the target branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants