Use permission level model for permissions

This is better. Because having 20 fucking columns for permissions is STUPID.
This commit is contained in:
jvyden 2022-05-22 15:51:02 -04:00
parent 1b5e58dd80
commit 8301418085
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
16 changed files with 542 additions and 433 deletions

View file

@ -1,4 +1,5 @@
#nullable enable
using LBPUnion.ProjectLighthouse.Administration;
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
using LBPUnion.ProjectLighthouse.Types;
@ -33,7 +34,7 @@ public class AdminBanUserPage : BaseLayout
this.TargetedUser = await this.Database.Users.FirstOrDefaultAsync(u => u.UserId == id);
if (this.TargetedUser == null) return this.NotFound();
this.TargetedUser.Banned = true;
this.TargetedUser.PermissionLevel = PermissionLevel.Default;
this.TargetedUser.BannedReason = reason;
// invalidate all currently active gametokens