admin checks

This commit is contained in:
MathMan05
2025-08-16 09:35:35 -05:00
parent ff8fec5494
commit e2aa322663
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -559,8 +559,8 @@ class Member extends SnowFlake {
headers,
});
}
hasPermission(name: string): boolean {
if (this.isAdmin()) {
hasPermission(name: string, adminOver = true): boolean {
if (this.isAdmin() && adminOver) {
return true;
}
for (const thing of this.roles) {
+1 -1
View File
@@ -854,7 +854,7 @@ class User extends SnowFlake {
const permDiv = document.createElement("div");
permDiv.classList.add("permbox");
const permsL = Permissions.info()
.filter((_) => memb.hasPermission(_.name))
.filter((_) => memb.hasPermission(_.name, false))
.map((_) => _.readableName);
for (const perm of permsL) {
const span = document.createElement("span");