From e8fd3fdc19ac6cab79f360b0bb54bf6df2c73f8f Mon Sep 17 00:00:00 2001 From: Aine Date: Sun, 28 Aug 2022 18:48:18 +0300 Subject: [PATCH] bot-postmoogle: add POSTMOOGLE_USERS config option --- roles/matrix-bot-postmoogle/defaults/main.yml | 9 +++++++++ roles/matrix-bot-postmoogle/templates/env.j2 | 1 + 2 files changed, 10 insertions(+) diff --git a/roles/matrix-bot-postmoogle/defaults/main.yml b/roles/matrix-bot-postmoogle/defaults/main.yml index 5272e2f2..bcd401e7 100644 --- a/roles/matrix-bot-postmoogle/defaults/main.yml +++ b/roles/matrix-bot-postmoogle/defaults/main.yml @@ -84,6 +84,15 @@ matrix_bot_postmoogle_noowner: false # Allow Postmoogle use by users over federation matrix_bot_postmoogle_federation: false +# A list of whitelisted users allowed to use the bridge. +# If not defined, everyone is allowed. +# Example set of rules: +# - @someone:example.com +# - @another:example.com +# - @bot.*:example.com +# - @*:another.com +matrix_bot_postmoogle_users: [] + # Sentry DSN matrix_bot_postmoogle_sentry: '' diff --git a/roles/matrix-bot-postmoogle/templates/env.j2 b/roles/matrix-bot-postmoogle/templates/env.j2 index 930681d8..0bd33752 100644 --- a/roles/matrix-bot-postmoogle/templates/env.j2 +++ b/roles/matrix-bot-postmoogle/templates/env.j2 @@ -12,5 +12,6 @@ POSTMOOGLE_LOGLEVEL={{ matrix_bot_postmoogle_loglevel }} POSTMOOGLE_NOENCRYPTION={{ matrix_bot_postmoogle_noencryption }} POSTMOOGLE_NOOWNER={{ matrix_bot_postmoogle_noowner }} POSTMOOGLE_FEDERATION={{ matrix_bot_postmoogle_federation }} +POSTMOOGLE_USERS={{ matrix_bot_postmoogle_users | default('') | join(' ') }} {{ matrix_bot_postmoogle_environment_variables_extension }}