1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 10:02:47 -05:00

[PM-10361] Remove Group.AccessAll from code (#4614)

* Remove Group.AccessAll from code

* Add shadow property config and migration
This commit is contained in:
Thomas Rittson
2024-08-13 08:54:03 +10:00
committed by GitHub
parent e2f05f4b8b
commit f04c3b8e54
19 changed files with 8238 additions and 104 deletions

View File

@ -13,7 +13,6 @@ public class Group : ITableObject<Guid>, IExternal
public Guid OrganizationId { get; set; }
[MaxLength(100)]
public string Name { get; set; } = null!;
public bool AccessAll { get; set; }
[MaxLength(300)]
public string? ExternalId { get; set; }
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;

View File

@ -115,11 +115,6 @@ public class CreateGroupCommand : ICreateGroupCommand
throw new BadRequestException("This organization cannot use groups.");
}
if (group.AccessAll)
{
throw new BadRequestException("The AccessAll property has been deprecated by collection enhancements. Assign the group to collections instead.");
}
var invalidAssociations = collections?.Where(cas => cas.Manage && (cas.ReadOnly || cas.HidePasswords));
if (invalidAssociations?.Any() ?? false)
{

View File

@ -136,11 +136,6 @@ public class UpdateGroupCommand : IUpdateGroupCommand
await ValidateMemberAccessAsync(originalGroup, memberAccess.ToList());
}
if (group.AccessAll)
{
throw new BadRequestException("The AccessAll property has been deprecated by collection enhancements. Assign the group to collections instead.");
}
var invalidAssociations = collectionAccess?.Where(cas => cas.Manage && (cas.ReadOnly || cas.HidePasswords));
if (invalidAssociations?.Any() ?? false)
{