1
0
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:
Rui Tomé
2025-08-13 15:01:51 +01:00
committed by GitHub
parent f88baba66b
commit 87877aeb3d
2 changed files with 0 additions and 7 deletions

View File

@@ -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; }
}

View File

@@ -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]