Add Admin Check, Add AdminLevel Column in database

This commit is contained in:
hydrant
2018-09-19 12:25:49 +02:00
parent 8299b6c900
commit 26bfaacd67
5 changed files with 78 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
using System;
using reallife_gamemode.Server.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -22,5 +23,8 @@ namespace reallife_gamemode.Server.Entities
[EmailAddress]
[StringLength(64)]
public string Email { get; set; }
public AdminLevel AdminLevel { get; set; }
public bool IsAdmin(AdminLevel level) => AdminLevel >= level;
}
}