Mare 0.9 (#27)
* add jwt expiry * update api * merge * start rework permissions * ok so in theory this compiles * make it work I guess * reuse some permissions * fix intermediate connectivity issues * fixes * whatever * some fixes I guess * fix some stuff * idk some random fixes I guess * change some defaults * update nuget * adjust order of operations * adjust deletion of account * remove todo --------- Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
@@ -5,4 +5,5 @@ public static class MareClaimTypes
|
||||
public const string Uid = "uid";
|
||||
public const string CharaIdent = "character_identification";
|
||||
public const string Internal = "internal";
|
||||
public const string Expires = "expiration_date";
|
||||
}
|
||||
|
||||
@@ -100,6 +100,16 @@ public static class SharedDbFunctions
|
||||
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
var defaultPermissions = await dbContext.UserDefaultPreferredPermissions.Where(u => u.UserUID == user.UID).ToListAsync().ConfigureAwait(false);
|
||||
var groupPermissions = await dbContext.GroupPairPreferredPermissions.Where(u => u.UserUID == user.UID).ToListAsync().ConfigureAwait(false);
|
||||
var individualPermissions = await dbContext.Permissions.Where(u => u.UserUID == user.UID || u.OtherUserUID == user.UID).ToListAsync().ConfigureAwait(false);
|
||||
var bannedinGroups = await dbContext.GroupBans.Where(u => u.BannedUserUID == user.UID).ToListAsync().ConfigureAwait(false);
|
||||
|
||||
dbContext.GroupPairPreferredPermissions.RemoveRange(groupPermissions);
|
||||
dbContext.UserDefaultPreferredPermissions.RemoveRange(defaultPermissions);
|
||||
dbContext.Permissions.RemoveRange(individualPermissions);
|
||||
dbContext.GroupBans.RemoveRange(bannedinGroups);
|
||||
|
||||
_logger.LogInformation("User purged: {uid}", user.UID);
|
||||
|
||||
dbContext.Auth.Remove(auth);
|
||||
|
||||
Reference in New Issue
Block a user