-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(additional-privileges): return correct project membership ID #4990
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
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile OverviewGreptile SummaryThis PR fixes Zod validation errors that occurred when managing additional privileges for identities in old projects with non-UUID IDs. The fix properly retrieves the actual
Confidence Score: 4/5
Important Files ChangedFile Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
backend/src/ee/routes/v2/identity-project-additional-privilege-router.ts, line 342 (link)logic: inconsistent with other endpoints - missing fallback to old project IDs
2 files reviewed, 1 comment
Context
Currently there's an issue with old projects that doesn't have UUID ID's. You are unable to list, create, update, or delete additional privileges on identities in such projects because the return data was incorrectly returning the project ID as the project membership ID, but it should've been the actual project membership ID. This would cause a zod validation error when the project is an old project with a non-UUID ID.
I've kept the existing functionality as a fallback, so if we aren't able to get the project membership ID, it will fall back to the project ID being passed by the user.
Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).