-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat!: add batch endpoint for adding organization members #24456
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
Changes from all commits
48724fd
f8c18f8
e8eef0e
875c34a
fd443ef
b81945a
20eef3e
964e05e
69e5d6f
9126b51
23d38a0
c61b66d
d20e4b8
9f18770
2562329
6ec918f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
P3 [CRF-8] The batch
InsertOrganizationMembersBatchauthorization preamble is a verbatim copy of the singularInsertOrganizationMember, and the two have already drifted. (Pariston P3, Ryosuke P3, Razor P3, Robin P3, Knov P3, Zoro P2)Six reviewers flagged this independently. This is security-sensitive authorization logic in two hand-maintained copies: the next tightening of
canAssignRolesor the role model lands on one path and silently skips the other. Kurapika verified the current.WithIDdivergence (prior CRF-7) is harmless (the batch check is equal-or-stricter, never looser), so this is a latent maintenance hazard rather than a live bug. Fix: extract a sharedauthorizeOrgMemberInsert(ctx, orgID, roles)helper both wrappers call, so they diverge only at the finalauthorizeContextobject and the.WithIDchoice becomes a deliberate, visible decision. Zoro rated this P2 for the security-sensitivity; set at P3 because there is no current authorization impact.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.
Done in
c61b66d388. ExtractedauthorizeOrganizationMemberInsert(ctx, orgID, roles), shared by bothInsertOrganizationMemberandInsertOrganizationMembersBatch. They now diverge only in the final authorize object, so the.WithIDdifference is a deliberate, visible one-liner in each wrapper and the role-assignment preamble can't drift.