mirror of
https://github.com/bitwarden/server.git
synced 2024-12-22 16:57:36 +01:00
[EC-1003] feat: remove externalId
from PUT/POST (#2589)
This commit is contained in:
parent
6514bdbb7e
commit
55cc022d9b
@ -10,8 +10,6 @@ public class GroupRequestModel
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public bool? AccessAll { get; set; }
|
||||
[StringLength(300)]
|
||||
public string ExternalId { get; set; }
|
||||
public IEnumerable<SelectionReadOnlyRequestModel> Collections { get; set; }
|
||||
public IEnumerable<Guid> Users { get; set; }
|
||||
|
||||
@ -27,7 +25,6 @@ public class GroupRequestModel
|
||||
{
|
||||
existingGroup.Name = Name;
|
||||
existingGroup.AccessAll = AccessAll.Value;
|
||||
existingGroup.ExternalId = ExternalId;
|
||||
return existingGroup;
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class GroupsControllerTests
|
||||
await sutProvider.GetDependency<ICreateGroupCommand>().Received(1).CreateGroupAsync(
|
||||
Arg.Is<Group>(g =>
|
||||
g.OrganizationId == organization.Id && g.Name == groupRequestModel.Name &&
|
||||
g.AccessAll == groupRequestModel.AccessAll && g.ExternalId == groupRequestModel.ExternalId),
|
||||
g.AccessAll == groupRequestModel.AccessAll),
|
||||
organization,
|
||||
Arg.Any<IEnumerable<CollectionAccessSelection>>(),
|
||||
Arg.Any<IEnumerable<Guid>>());
|
||||
@ -38,7 +38,6 @@ public class GroupsControllerTests
|
||||
Assert.Equal(groupRequestModel.Name, response.Name);
|
||||
Assert.Equal(organization.Id.ToString(), response.OrganizationId);
|
||||
Assert.Equal(groupRequestModel.AccessAll, response.AccessAll);
|
||||
Assert.Equal(groupRequestModel.ExternalId, response.ExternalId);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@ -57,7 +56,7 @@ public class GroupsControllerTests
|
||||
await sutProvider.GetDependency<IUpdateGroupCommand>().Received(1).UpdateGroupAsync(
|
||||
Arg.Is<Group>(g =>
|
||||
g.OrganizationId == organization.Id && g.Name == groupRequestModel.Name &&
|
||||
g.AccessAll == groupRequestModel.AccessAll && g.ExternalId == groupRequestModel.ExternalId),
|
||||
g.AccessAll == groupRequestModel.AccessAll),
|
||||
Arg.Is<Organization>(o => o.Id == organization.Id),
|
||||
Arg.Any<IEnumerable<CollectionAccessSelection>>(),
|
||||
Arg.Any<IEnumerable<Guid>>());
|
||||
@ -66,6 +65,5 @@ public class GroupsControllerTests
|
||||
Assert.Equal(groupRequestModel.Name, response.Name);
|
||||
Assert.Equal(organization.Id.ToString(), response.OrganizationId);
|
||||
Assert.Equal(groupRequestModel.AccessAll, response.AccessAll);
|
||||
Assert.Equal(groupRequestModel.ExternalId, response.ExternalId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user