1
0
Fork 0

Attempt to fix deserialisation issue, but there's still some kind of problem

This commit is contained in:
Starbeamrainbowlabs 2018-01-09 19:50:06 +00:00
parent 10192e88a4
commit aacb6f26f9
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 5 additions and 1 deletions

View File

@ -28,21 +28,25 @@ namespace Nibriboard.Userspace
/// <summary>
/// Represents a single Nibriboard user.
/// </summary>
[JsonObject(MemberSerialization.OptOut)]
[JsonObject(MemberSerialization.OptIn)]
public class User
{
private static ISimpleHash passwordHasher = new SimpleHash();
private UserManager userManager;
[JsonProperty]
public DateTime CreationTime { get; set; }
[JsonProperty]
public string Username { get; set; }
[JsonProperty]
public string HashedPassword { get; set; }
[JsonIgnore]
public List<RbacRole> Roles { get; set; } = new List<RbacRole>();
private List<string> rolesText = null;
[JsonProperty("RolesText")]
public List<string> RolesText {
get {
return new List<string>(Roles.Select((RbacRole role) => role.Name));