mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2025-08-15 18:00:20 -04:00
feat: add optional whitelist identifiying users to be allowed access to the bbs
This commit is contained in:
parent
295fb35c92
commit
3620d33f7f
4 changed files with 22 additions and 4 deletions
|
@ -117,6 +117,9 @@ def initialize_config(config_file: str = None) -> dict[str, Any]:
|
|||
allowed_nodes = config.get('allow_list', 'allowed_nodes', fallback='').split(',')
|
||||
if allowed_nodes == ['']:
|
||||
allowed_nodes = []
|
||||
whitelist = config.get('whitelist', 'allowed_users', fallback='').split(',')
|
||||
if whitelist == ['']:
|
||||
whitelist = []
|
||||
|
||||
print(f"Nodes with Urgent board permissions: {allowed_nodes}")
|
||||
|
||||
|
@ -127,7 +130,8 @@ def initialize_config(config_file: str = None) -> dict[str, Any]:
|
|||
'port': port,
|
||||
'bbs_nodes': bbs_nodes,
|
||||
'allowed_nodes': allowed_nodes,
|
||||
'mqtt_topic': 'meshtastic.receive'
|
||||
'mqtt_topic': 'meshtastic.receive',
|
||||
'whitelist': whitelist
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue