Webatrice updates (#4366)

This commit is contained in:
Jeremy Letto 2021-05-21 20:23:30 -05:00 committed by GitHub
parent 8db9475804
commit 0d05f9097d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 5517 additions and 20090 deletions

View file

@ -14,7 +14,9 @@ export default class AuthenticationService {
}
static isModerator(user) {
return user.userLevel >= webClient.pb.ServerInfo_User.UserLevelFlag.IsModerator;
const moderatorLevel = webClient.pb.ServerInfo_User.UserLevelFlag.IsModerator;
// @TODO tell cockatrice not to do this so shittily
return (user.userLevel & moderatorLevel) === moderatorLevel;
}
static isAdmin() {