Added IsAuthorized overloads for flexibility
This commit is contained in:
parent
065086bfa2
commit
ff2f5eaaf6
4
Auth.cs
4
Auth.cs
@ -21,6 +21,10 @@ public static class Auth
|
||||
{
|
||||
return TryGetUser(context, out SafeUser user) && user.Level <= requiredLevel;
|
||||
}
|
||||
internal static bool IsAuthorized(HttpContext context, string Username)
|
||||
{
|
||||
return TryGetUser(context, out SafeUser user) && user.Username == Username;
|
||||
}
|
||||
|
||||
internal static Task RejectUnauthorized(HttpContext context)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user