refactor!: unlimited permissions bridge config

This commit is contained in:
decentral1se 2023-01-08 01:04:52 +01:00
parent e7f81cb9ea
commit 9b12e4a0eb
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
5 changed files with 7 additions and 16 deletions

View File

@ -93,8 +93,7 @@ ALLOWED_LIFETIME_MAX=4w
#VERIFY_SSL=false #VERIFY_SSL=false
#ENABLE_ENCRYPTION=true #ENABLE_ENCRYPTION=true
#TELEGRAM_APP_ID= #TELEGRAM_APP_ID=
#TELEGRAM_BRIDGE_ADMIN_1= TELEGRAM_BRIDGE_PERMISSIONS="{ \"*\": \"relaybot\" }"
#TELEGRAM_BRIDGE_ADMIN_2=
#SECRET_TELEGRAM_DB_PASSWORD_VERSION=v1 #SECRET_TELEGRAM_DB_PASSWORD_VERSION=v1
#SECRET_TELEGRAM_API_HASH_VERSION=v1 #SECRET_TELEGRAM_API_HASH_VERSION=v1
#SECRET_TELEGRAM_BOT_TOKEN_VERSION=v1 #SECRET_TELEGRAM_BOT_TOKEN_VERSION=v1
@ -109,8 +108,7 @@ ALLOWED_LIFETIME_MAX=4w
#COMPOSE_FILE="$COMPOSE_FILE:compose.signal.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.signal.yml"
#SIGNAL_ENABLE_ENCRYPTION=true #SIGNAL_ENABLE_ENCRYPTION=true
#SIGNAL_BRIDGE_ADMIN_1="@foo:example.com" SIGNAL_BRIDGE_PERMISSIONS="{ \"*\": \"relay\" }"
#SIGNAL_BRIDGE_ADMIN_2="@bar:example.com"
#SECRET_SIGNAL_AS_TOKEN_VERSION=v1 #SECRET_SIGNAL_AS_TOKEN_VERSION=v1
#SECRET_SIGNAL_DB_PASSWORD_VERSION=v1 #SECRET_SIGNAL_DB_PASSWORD_VERSION=v1
#SECRET_SIGNAL_HS_TOKEN_VERSION=v1 #SECRET_SIGNAL_HS_TOKEN_VERSION=v1

View File

@ -26,8 +26,7 @@ services:
environment: environment:
- HOMESERVER_DOMAIN - HOMESERVER_DOMAIN
- HOMESERVER_URL - HOMESERVER_URL
- SIGNAL_BRIDGE_ADMIN_1 - SIGNAL_BRIDGE_PERMISSIONS
- SIGNAL_BRIDGE_ADMIN_2
- SIGNAL_ENABLE_ENCRYPTION - SIGNAL_ENABLE_ENCRYPTION
- VERIFY_SSL - VERIFY_SSL
secrets: secrets:

View File

@ -24,8 +24,7 @@ services:
- HOMESERVER_DOMAIN - HOMESERVER_DOMAIN
- HOMESERVER_URL - HOMESERVER_URL
- TELEGRAM_APP_ID - TELEGRAM_APP_ID
- TELEGRAM_BRIDGE_ADMIN_1 - TELEGRAM_BRIDGE_PERMISSIONS
- TELEGRAM_BRIDGE_ADMIN_2
- VERIFY_SSL - VERIFY_SSL
secrets: secrets:
- telegram_api_hash - telegram_api_hash

View File

@ -267,10 +267,8 @@ bridge:
# * - All Matrix users # * - All Matrix users
# domain - All users on that homeserver # domain - All users on that homeserver
# mxid - Specific user # mxid - Specific user
permissions: permissions: "{{ env "SIGNAL_BRIDGE_PERMISSIONS" }}"
"*": "relay"
"{{ env "SIGNAL_BRIDGE_ADMIN_1" }}": "admin"
"{{ env "SIGNAL_BRIDGE_ADMIN_2" }}": "admin"
relay: relay:
# Whether relay mode should be allowed. If allowed, `!signal set-relay` can be used to turn any # Whether relay mode should be allowed. If allowed, `!signal set-relay` can be used to turn any
# authenticated user into a relaybot for that chat. # authenticated user into a relaybot for that chat.

View File

@ -412,10 +412,7 @@ bridge:
# * - All Matrix users # * - All Matrix users
# domain - All users on that homeserver # domain - All users on that homeserver
# mxid - Specific user # mxid - Specific user
permissions: permissions: "{{ env "TELEGRAM_BRIDGE_PERMISSIONS" }}"
"*": "relaybot"
"{{ env "TELEGRAM_BRIDGE_ADMIN_1" }}": "admin"
"{{ env "TELEGRAM_BRIDGE_ADMIN_2" }}": "admin"
# Options related to the message relay Telegram bot. # Options related to the message relay Telegram bot.
relaybot: relaybot: