innightwolfsleep / text-generation-webui-telegram_bot

LLM telegram bot
MIT License
103 stars 20 forks source link

Bug: user roles affecting admin users #165

Closed leros1337 closed 11 months ago

leros1337 commented 11 months ago

Steps to reproduce:

  1. Edit telegram_user_roles.json as below (for example) { "Impersonate": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": false}, "Next": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": false}, "Continue": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": false,"query": false}, "Delete_one_word": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": false,"query": false}, "Regen": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": false,"query": true}, "Cutoff": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": false,"query": false}, "options": {"admin": true,"chat": true,"chat-restricted": true,"notebook": true,"persona": true,"query": true}, "Chars_list": {"admin": true,"chat": true,"chat-restricted": false,"notebook": false,"persona": false,"query": true}, "Chars_load": {"admin": true,"chat": true,"chat-restricted": false,"notebook": true,"persona": false,"query": true}, "Reset": {"admin": true,"chat": true,"chat-restricted": true,"notebook": true,"persona": false,"query": false}, "Download": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": true}, "Context": {"admin": true,"chat": true,"chat-restricted": true,"notebook": true,"persona": true,"query": true}, "Language_list": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": true}, "Language_load": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": true}, "Voice_list": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": true}, "Voice_load": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": true}, "Presets_list": {"admin": true,"chat": false,"chat-restricted": false,"notebook": false,"persona": false,"query": false}, "Preset_load": {"admin": true,"chat": false,"chat-restricted": false,"notebook": false,"persona": false,"query": false}, "Model_list": {"admin": true,"chat": false,"chat-restricted": false,"notebook": false,"persona": false,"query": false}, "Model_load": {"admin": true,"chat": false,"chat-restricted": false,"notebook": false,"persona": false,"query": false}, "Delete": {"admin": true,"chat": true,"chat-restricted": true,"notebook": false,"persona": true,"query": true}, "message": {"admin": true,"chat": true,"chat-restricted": true,"notebook": true,"persona": true,"query": true} }
  2. Edit bot_mode in ext_config.json or app_config.json to "bot_mode": "notebook"
  3. Add your tg_id to telegram_admins.txt
  4. Now even if you admin you cant see buttons

Not sure, but looks like bug

innightwolfsleep commented 11 months ago

Now even if you admin you cant see buttons

Not exactly... If you are admin - you can get all option buttons, but chat buttons are the same as for other users. By my concept, admin have access to preset and model change buttons - because this influence for all other users. While chatting, admin should get the same rules as others.

If admin have a problem with option buttons - please, inform me.