Browse Source

Merge pull request #337 from seamys/isLockedIssue

Fixed isLocked issue
pull/339/head
Sebastian Stehle 7 years ago
committed by GitHub
parent
commit
5f83cc6f71
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/Squidex.Domain.Users/UserWithClaims.cs
  2. 2
      src/Squidex.Shared/Users/IUser.cs

6
src/Squidex.Domain.Users/UserWithClaims.cs

@ -5,6 +5,7 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
@ -30,6 +31,11 @@ namespace Squidex.Domain.Users
get { return Identity.Email; }
}
public bool IsLocked
{
get { return Identity.LockoutEnd > DateTime.Now.ToUniversalTime(); }
}
IReadOnlyList<Claim> IUser.Claims
{
get { return Claims; }

2
src/Squidex.Shared/Users/IUser.cs

@ -16,6 +16,8 @@ namespace Squidex.Shared.Users
string Email { get; }
bool IsLocked { get; }
IReadOnlyList<Claim> Claims { get; }
}
}

Loading…
Cancel
Save