1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

PM-10600: Revert global push notifications

This commit is contained in:
Maciej Zieniuk
2024-10-22 18:27:18 +01:00
parent 4173fa8e81
commit 3035abfa30
12 changed files with 10 additions and 115 deletions

View File

@ -12,12 +12,11 @@ public class PushSendRequestModel : IValidatableObject
public string? Identifier { get; set; }
[Required] public PushType Type { get; set; }
[Required] public object Payload { get; set; } = null!;
public bool Global { get; set; }
public ClientType? ClientType { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (string.IsNullOrWhiteSpace(UserId) && string.IsNullOrWhiteSpace(OrganizationId) && !Global)
if (string.IsNullOrWhiteSpace(UserId) && string.IsNullOrWhiteSpace(OrganizationId))
{
yield return new ValidationResult($"{nameof(UserId)} or {nameof(OrganizationId)} is required.");
}