Browse Source

Доступ к модулю с языками и сообщению отключен для новых пользователей. Доступен только для админа.

test_bot
Alexei 2 years ago
parent
commit
987b64c808
  1. 2
      bot_modules/languages.py
  2. 2
      bot_modules/messages.py

2
bot_modules/languages.py

@ -52,7 +52,7 @@ init_bd_cmds = [f'''CREATE TABLE IF NOT EXISTS {table_name}(
UNIQUE({key_name}), UNIQUE({key_name}),
UNIQUE({name_field}) UNIQUE({name_field})
)''', )''',
f"INSERT OR IGNORE INTO module_access (modName, modAccess, itemDefaultAccess) VALUES ('{module_name}', '{user_access.user_access_group_new}=va', '{user_access.user_access_group_new}=va');" f"INSERT OR IGNORE INTO module_access (modName, modAccess, itemDefaultAccess) VALUES ('{module_name}', '{user_access.user_access_group_all}=-', '{user_access.user_access_group_all}=-');"
] ]
# --------------------------------------------------------- # ---------------------------------------------------------

2
bot_modules/messages.py

@ -58,7 +58,7 @@ init_bd_cmds = [f'''CREATE TABLE IF NOT EXISTS {table_name}(
UNIQUE({key_name}), UNIQUE({key_name}),
UNIQUE({name_field}, {parent_id_field}) UNIQUE({name_field}, {parent_id_field})
)''', )''',
f"INSERT OR IGNORE INTO module_access (modName, modAccess, itemDefaultAccess) VALUES ('{module_name}', '{user_access.user_access_group_new}=va', '{user_access.user_access_group_new}=va');" f"INSERT OR IGNORE INTO module_access (modName, modAccess, itemDefaultAccess) VALUES ('{module_name}', '{user_access.user_access_group_all}=-', '{user_access.user_access_group_all}=-');"
] ]
select_messages_prefix = '' select_messages_prefix = ''

Loading…
Cancel
Save