improve panel handler security

if later it will apear somewhere else that admin block
This commit is contained in:
Akulij 2025-03-27 22:02:14 +08:00
parent 59d7f07f48
commit ecd55a3031

View File

@ -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...")