Skip to content

Commit

Permalink
fix: fix user_allowed_domain typo in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed May 13, 2024
1 parent af8bfbb commit 383c036
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ salt=b"\xce,\xa1\xc6lY\x80\xe3X}\x91\xa60m\xa8N"
## Albert env variables
albert_api_url="https://albert-server-url.example.com"
albert_api_token="INSERT_YOUR_TOKEN"
users_allowed_domains='["ministere_example.gouv.fr", "ministere_example2.gouv.fr"]'
user_allowed_domains='["ministere_example.gouv.fr", "ministere_example2.gouv.fr"]'

# For docker-compose deployment
MATRIX_HOME_SERVER=
Expand Down
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Config(BaseConfig):
groups_used: list[str] = Field(["basic"], description="List of commands groups to use")
albert_api_url: str = Field("http://localhost:8090/api/v2", description="Albert API base URL")
albert_api_token: str = Field("", description="Albert API TOKEN")
users_allowed_domains: list[str] = Field(
user_allowed_domains: list[str] = Field(
[], description="List of allowed Tchap users email domains allowed to use Albert Tchap bot"
)

Expand Down
2 changes: 1 addition & 1 deletion app/matrix_bot/eventparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def is_from_this_bot(self) -> bool:
return self.is_from_userid(self.matrix_client.user_id)

def is_sender_allowed(self) -> bool:
return self.sender_domain() in config.users_allowed_domains
return self.sender_domain() in config.user_allowed_domains

def room_is_direct_message(self) -> bool:
return room_is_direct_message(self.room)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- matrix_bot_password=${MATRIX_BOT_PASSWORD}
- session_path=/data/session.txt
- groups_used=["basic", "albert"]
- users_allowed_domains=${USER_ALLOWED_DOMAINS}
- user_allowed_domains=${USER_ALLOWED_DOMAINS}
- salt=${SALT}
- albert_api_url=${ALBERT_API_URL}
- albert_api_token=${ALBERT_API_TOKEN}
Expand Down

0 comments on commit 383c036

Please sign in to comment.