Add the moderator role
This commit is contained in:
parent
baf2b5a6a9
commit
dcc2d3b9dc
9 changed files with 28 additions and 16 deletions
|
@ -81,3 +81,11 @@ func (s *Session) Id() string {
|
|||
func (s *Session) IsAdmin() bool {
|
||||
return s.Role == "admin"
|
||||
}
|
||||
|
||||
func (s *Session) IsModerator() bool {
|
||||
admin := map[string]bool{
|
||||
"admin": true,
|
||||
"moderator": true,
|
||||
}
|
||||
return admin[s.Role]
|
||||
}
|
||||
|
|
Reference in a new issue