mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
remove type aliases
This commit is contained in:
parent
141f0e59f5
commit
cea9ae62d8
58 changed files with 412 additions and 455 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { StatusEnum, User, WebSocketConnectReason, WebSocketConnectOptions } from 'types';
|
||||
import { StatusEnum, WebSocketConnectReason, WebSocketConnectOptions } from 'types';
|
||||
import { SessionCommands } from 'websocket';
|
||||
import { ServerInfo_User_UserLevelFlag } from 'generated/proto/serverinfo_user_pb';
|
||||
import { ServerInfo_User, ServerInfo_User_UserLevelFlag } from 'generated/proto/serverinfo_user_pb';
|
||||
|
||||
export class AuthenticationService {
|
||||
static login(options: WebSocketConnectOptions): void {
|
||||
|
|
@ -39,7 +39,7 @@ export class AuthenticationService {
|
|||
return state === StatusEnum.LOGGED_IN;
|
||||
}
|
||||
|
||||
static isModerator(user: User): boolean {
|
||||
static isModerator(user: ServerInfo_User): boolean {
|
||||
const moderatorLevel = ServerInfo_User_UserLevelFlag.IsModerator;
|
||||
// @TODO tell cockatrice not to do this so shittily
|
||||
return (user.userLevel & moderatorLevel) === moderatorLevel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue