mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
[PM-24414] Remove CollectionType property from the public CollectionResponseModel (#6180)
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Api.AdminConsole.Public.Models.Response;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Api.Models.Public.Response;
|
||||
@@ -24,7 +23,6 @@ public class CollectionResponseModel : CollectionBaseModel, IResponseModel
|
||||
Id = collection.Id;
|
||||
ExternalId = collection.ExternalId;
|
||||
Groups = groups?.Select(c => new AssociationWithPermissionsResponseModel(c));
|
||||
Type = collection.Type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -43,8 +41,4 @@ public class CollectionResponseModel : CollectionBaseModel, IResponseModel
|
||||
/// The associated groups that this collection is assigned to.
|
||||
/// </summary>
|
||||
public IEnumerable<AssociationWithPermissionsResponseModel> Groups { get; set; }
|
||||
/// <summary>
|
||||
/// The type of this collection
|
||||
/// </summary>
|
||||
public CollectionType Type { get; set; }
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ public class CollectionsControllerTests
|
||||
var jsonResult = Assert.IsType<JsonResult>(result);
|
||||
var response = Assert.IsType<CollectionResponseModel>(jsonResult.Value);
|
||||
Assert.Equal(collection.Id, response.Id);
|
||||
Assert.Equal(collection.Type, response.Type);
|
||||
}
|
||||
|
||||
[Theory, BitAutoData]
|
||||
|
||||
Reference in New Issue
Block a user