mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[AC-2426] Allow editing of client organization name (#4072)
* Allow editing of client organization name * Removing unnecessary using for linter
This commit is contained in:
@ -133,10 +133,17 @@ public class ProviderClientsController(
|
||||
return TypedResults.Problem();
|
||||
}
|
||||
|
||||
await assignSeatsToClientOrganizationCommand.AssignSeatsToClientOrganization(
|
||||
provider,
|
||||
clientOrganization,
|
||||
requestBody.AssignedSeats);
|
||||
if (clientOrganization.Seats != requestBody.AssignedSeats)
|
||||
{
|
||||
await assignSeatsToClientOrganizationCommand.AssignSeatsToClientOrganization(
|
||||
provider,
|
||||
clientOrganization,
|
||||
requestBody.AssignedSeats);
|
||||
}
|
||||
|
||||
clientOrganization.Name = requestBody.Name;
|
||||
|
||||
await organizationRepository.ReplaceAsync(clientOrganization);
|
||||
|
||||
return TypedResults.Ok();
|
||||
}
|
||||
|
@ -7,4 +7,7 @@ public class UpdateClientOrganizationRequestBody
|
||||
[Required]
|
||||
[Range(0, int.MaxValue, ErrorMessage = "You cannot assign negative seats to a client organization.")]
|
||||
public int AssignedSeats { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user