improve panel handler security
if later it will apear somewhere else that admin block
This commit is contained in:
parent
59d7f07f48
commit
ecd55a3031
@ -135,6 +135,7 @@ func handleSecretCommand(bc BotController, update tgbotapi.Update, user User) {
|
||||
}
|
||||
|
||||
func handlePanelCommand(bc BotController, update tgbotapi.Update, user User) {
|
||||
if !user.IsAdmin() {return}
|
||||
if !user.IsEffectiveAdmin() {
|
||||
bc.db.Model(&user).Update("RoleBitmask", user.RoleBitmask|0b10)
|
||||
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "You was in usermode, turned back to admin mode...")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user