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:
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user