Skip to content

[PM-38935] - Moved MembersController to v2 Update. - #8281

Open
jrmccannon wants to merge 2 commits into
mainfrom
jmccannon/ac/PM-38935-member-controller-v2-update
Open

[PM-38935] - Moved MembersController to v2 Update.#8281
jrmccannon wants to merge 2 commits into
mainfrom
jmccannon/ac/PM-38935-member-controller-v2-update

Conversation

@jrmccannon

@jrmccannon jrmccannon commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

PM-38935

📔 Objective

Moved the MembersController to the v2 UpdateOrganizationUserCommand. Added the optional parameters for Name and Email. Also did some QoL improvements for the MembersController to take advantage of the new error message types.

@jrmccannon
jrmccannon requested a review from a team as a code owner August 28, 2026 21:05
@jrmccannon jrmccannon added the t:feature Change Type - Feature Development label Aug 28, 2026
sven-bitwarden
sven-bitwarden previously approved these changes Aug 31, 2026

@eliykat eliykat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No review required from me, looks straightforward.

@jrmccannon
jrmccannon force-pushed the jmccannon/ac/PM-38935-member-controller-v2-update branch from 7860559 to 84a6d81 Compare September 2, 2026 14:56
@jrmccannon

Copy link
Copy Markdown
Contributor Author

No review required from me, looks straightforward.

Do you think there will be an issue with adding the name and email to the request and changing the response to IResult instead of ActionResult?

@sven-bitwarden

Copy link
Copy Markdown
Contributor

... and changing the response to IResult instead of ActionResult?

Have you checked if the output OpenAPI file is different? Curious if it'll impact https://bitwarden.com/help/api/

@eliykat eliykat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jrmccannon

Do you think there will be an issue with adding the name and email to the request

As long as they are optional (nullable) for backwards compatibility with existing consumers - that's OK. Your integration tests should assert this.

I've also suggested enabling the nullable context below so that this is clear in the code. (may apply to other files as well)

and changing the response to IResult instead of ActionResult?

In both cases I believe the openapi spec is generated based on the annotations (ProducesResponseType) so I don't think it'll have any effect, but as @sven-bitwarden said you can check the swaggerUI locally to see.

@@ -2,8 +2,8 @@
#nullable disable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please remove this nullable directive and annotate any nullable fields accordingly.

Comment on lines +22 to +34
/// <summary>
/// The member's email address. Can only be changed for a claimed member without a master password when the
/// new address is on a domain verified by the organization.
/// </summary>
[StrictEmailAddressNullable]
[StringLength(256)]
public string Email { get; set; }

return existingUser;
}
/// <summary>
/// The member's name. Can only be changed for a claimed member.
/// </summary>
[StringLength(50)]
public string Name { get; set; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume these are nullable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants