Browse Source
Merge pull request #337 from seamys/isLockedIssue
Fixed isLocked issue
pull/339/head
Sebastian Stehle
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
0 deletions
-
src/Squidex.Domain.Users/UserWithClaims.cs
-
src/Squidex.Shared/Users/IUser.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; } |
|
|
|
|
|
|
|
@ -16,6 +16,8 @@ namespace Squidex.Shared.Users |
|
|
|
|
|
|
|
string Email { get; } |
|
|
|
|
|
|
|
bool IsLocked { get; } |
|
|
|
|
|
|
|
IReadOnlyList<Claim> Claims { get; } |
|
|
|
} |
|
|
|
} |
|
|
|
|