mirror of
https://github.com/bitwarden/server.git
synced 2025-12-12 07:34:55 -06:00
* Add CreateCollectionAsync method to OrganizationTestHelpers for collection creation with user and group associations * Update public MembersController List endpoint to include associated collections in member response model * Update MembersControllerTests to validate collection associations in List endpoint. Add JsonConstructor to AssociationWithPermissionsResponseModel * Refactor MembersController by removing unused IUserService and IApplicationCacheService dependencies. * Remove nullable disable directive from Public MembersController
25 lines
683 B
C#
25 lines
683 B
C#
using System.Text.Json.Serialization;
|
|
using Bit.Core.Models.Data;
|
|
|
|
namespace Bit.Api.AdminConsole.Public.Models.Response;
|
|
|
|
public class AssociationWithPermissionsResponseModel : AssociationWithPermissionsBaseModel
|
|
{
|
|
[JsonConstructor]
|
|
public AssociationWithPermissionsResponseModel() : base()
|
|
{
|
|
}
|
|
|
|
public AssociationWithPermissionsResponseModel(CollectionAccessSelection selection)
|
|
{
|
|
if (selection == null)
|
|
{
|
|
throw new ArgumentNullException(nameof(selection));
|
|
}
|
|
Id = selection.Id;
|
|
ReadOnly = selection.ReadOnly;
|
|
HidePasswords = selection.HidePasswords;
|
|
Manage = selection.Manage;
|
|
}
|
|
}
|