add authorization

This commit is contained in:
Alex Bezdieniezhnykh
2024-11-11 21:07:28 +02:00
parent ca6175da7f
commit 85139b4fd2
12 changed files with 146 additions and 40 deletions
+3 -2
View File
@@ -1,9 +1,10 @@
namespace Azaion.Common;
namespace Azaion.Common.Entities;
public enum RoleEnum
{
Operator,
Validator,
CompanionPC,
Admin
Admin,
ApiAdmin
}
+1 -3
View File
@@ -3,10 +3,8 @@
public class User
{
public string Id { get; set; } = null!;
public string Username { get; set; } = null!;
public string Email { get; set; } = null!;
public string PasswordHash { get; set; } = null!;
public string HardwareId { get; set; } = null!;
public RoleEnum Role { get; set; }
public string UniqueKey => $"Azaion#{Username}#{PasswordHash}#{HardwareId}";
}