mirror of
https://github.com/bitwarden/server.git
synced 2025-04-07 05:58:13 -05:00
deleted instead of disabled
This commit is contained in:
parent
933a3feade
commit
f0328cb3ab
@ -243,8 +243,8 @@ namespace Bit.Api.Controllers
|
|||||||
orgIdGuid,
|
orgIdGuid,
|
||||||
userId.Value,
|
userId.Value,
|
||||||
model.Groups.Select(g => g.ToImportedGroup(orgIdGuid)),
|
model.Groups.Select(g => g.ToImportedGroup(orgIdGuid)),
|
||||||
model.Users.Where(u => !u.Disabled).Select(u => u.ToImportedOrganizationUser()),
|
model.Users.Where(u => !u.Deleted).Select(u => u.ToImportedOrganizationUser()),
|
||||||
model.Users.Where(u => u.Disabled).Select(u => u.ExternalId));
|
model.Users.Where(u => u.Deleted).Select(u => u.ExternalId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ namespace Bit.Core.Models.Api
|
|||||||
{
|
{
|
||||||
[EmailAddress]
|
[EmailAddress]
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public bool Disabled { get; set; }
|
public bool Deleted { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string ExternalId { get; set; }
|
public string ExternalId { get; set; }
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ namespace Bit.Core.Models.Api
|
|||||||
|
|
||||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
if(string.IsNullOrWhiteSpace(Email) && !Disabled)
|
if(string.IsNullOrWhiteSpace(Email) && !Deleted)
|
||||||
{
|
{
|
||||||
yield return new ValidationResult("Email is required for enabled users.", new string[] { nameof(Email) });
|
yield return new ValidationResult("Email is required for enabled users.", new string[] { nameof(Email) });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user