Browse Source

Merge pull request #614 from ionite34/new-roles

new roles
pull/629/head
JT 7 months ago committed by GitHub
parent
commit
56f5dca3bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      StabilityMatrix.Core/Models/Api/Lykos/GetUserResponse.cs
  2. 14
      StabilityMatrix.Core/Models/Api/Lykos/LykosRole.cs

7
StabilityMatrix.Core/Models/Api/Lykos/GetUserResponse.cs

@ -7,9 +7,8 @@ public record GetUserResponse
public required HashSet<LykosRole> UserRoles { get; init; }
public string? PatreonId { get; init; }
public bool IsEmailVerified { get; init; }
public bool CanHasDevBuild { get; init; }
public bool CanHasPreviewBuild { get; init; }
public bool IsActiveSupporter =>
UserRoles.Contains(LykosRole.PatreonSupporter)
|| UserRoles.Contains(LykosRole.Insider)
|| (UserRoles.Contains(LykosRole.Developer) && PatreonId is not null);
public bool IsActiveSupporter => CanHasDevBuild || CanHasPreviewBuild;
}

14
StabilityMatrix.Core/Models/Api/Lykos/LykosRole.cs

@ -7,6 +7,16 @@ public enum LykosRole
Supporter = 1,
PatreonSupporter = 2,
Insider = 3,
BetaTester = 4,
Developer = 5
// 4 and 5 have been retired 🫡
[Obsolete("Roles restructured, use the new BetaTester role")]
OLD_BetaTester = 4,
[Obsolete("Roles restructured, use the new Developer role")]
OLD_Developer = 5,
Pioneer = 6,
Visionary = 7,
BetaTester = 100,
Translator = 101,
Developer = 900,
}

Loading…
Cancel
Save