mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-06-01 09:42:18 +00:00
Fix user permissions
This commit is contained in:
parent
6481da2270
commit
45947b67df
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ User.prototype.isGatherAdmin = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
User.prototype.isUserAdmin = function () {
|
User.prototype.isUserAdmin = function () {
|
||||||
return this.admin || this.moderator;
|
return this.admin;
|
||||||
};
|
};
|
||||||
|
|
||||||
User.prototype.getSteamId = function () {
|
User.prototype.getSteamId = function () {
|
||||||
|
|
|
@ -91,7 +91,7 @@ describe("User", () => {
|
||||||
user.moderator = false;
|
user.moderator = false;
|
||||||
assert.isTrue(user.isUserAdmin());
|
assert.isTrue(user.isUserAdmin());
|
||||||
});
|
});
|
||||||
it ("returns true if moderator", () => {
|
it ("returns false if moderator", () => {
|
||||||
user.admin = false;
|
user.admin = false;
|
||||||
user.moderator = true;
|
user.moderator = true;
|
||||||
assert.isTrue(user.isUserAdmin());
|
assert.isTrue(user.isUserAdmin());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue