Skip to content

Commit

Permalink
(#405) users: update IdentityContext
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Sep 5, 2024
1 parent c3477a4 commit 178b71e
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ internal class IdentityContext : IIdentityContext
public bool IsAuthenticated { get; }
public bool IsAdmin { get; }
public bool IsBanned { get; }
public bool IsOrganizer { get; }
public IDictionary<string, string> Claims { get; } = new Dictionary<string, string>();

internal IdentityContext()
Expand All @@ -34,7 +33,6 @@ internal IdentityContext(string id, string role, bool isAuthenticated, IDictiona
IsAuthenticated = isAuthenticated;
IsAdmin = Role.Equals("admin", StringComparison.InvariantCultureIgnoreCase);
IsBanned = Role.Equals("banned", StringComparison.InvariantCultureIgnoreCase);
IsOrganizer = Role.Equals("organizer", StringComparison.InvariantCultureIgnoreCase);
Claims = claims ?? new Dictionary<string, string>();
Name = Claims.TryGetValue("name", out var name) ? name : string.Empty;
Email = Claims.TryGetValue("email", out var email) ? email : string.Empty;
Expand Down

0 comments on commit 178b71e

Please sign in to comment.