This commit is contained in:
2021-03-12 21:54:48 +00:00
parent 5c6cf1939b
commit 0c0169d6b2
2 changed files with 4 additions and 4 deletions

View File

@@ -665,7 +665,7 @@ namespace AyaNova.Api.Controllers
}
var u = await ct.User.FirstOrDefaultAsync(z => z.Id == UserId);
var u = await ct.User.FirstOrDefaultAsync(z => z.Id == id);
if (u == null)//should never happen but ?
return StatusCode(403, new ApiNotAuthorizedResponse());

View File

@@ -29,7 +29,7 @@ namespace AyaNova.Models
public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
public bool TwoFactorEnabled { get; set; }
public DateTime? LastLogin { get; set; }
[NotMapped, JsonIgnore]
@@ -59,7 +59,7 @@ namespace AyaNova.Models
public DateTime? LastLogin { get; set; }
public string Login { get; set; }
public string Password { get; set; }
public bool TwoFactorEnabled {get;set;}
public bool TwoFactorEnabled { get; set; }
[Required]
public AuthorizationRoles Roles { get; set; }
[Required]
@@ -98,7 +98,7 @@ namespace AyaNova.Models
public DateTime? PasswordResetCodeExpire { get; set; }//---
[JsonIgnore]
public string TotpSecret { get; set; }//---
[JsonIgnore]
[JsonIgnore]
public string TempToken { get; set; }//--- Used for TFA verification step 2
//==========================