mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-05-14 03:55:10 +00:00
admin checks
This commit is contained in:
@@ -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
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user