Commit Graph

9 Commits

Author SHA1 Message Date
Aine
97aacbf143 export MXID patterns parsing to external lib 2022-09-14 13:46:56 +03:00
Aine
fda0d62087 send emails 2022-09-04 22:09:53 +03:00
Aine
5ed3a53223 diff bot and room settings 2022-08-30 14:37:19 +03:00
Aine
0ba951fbe6 set default POSTMOOGLE_USERS pattern 2022-08-29 20:56:28 +03:00
Aine
e0bd71717c remove NOOWNER, closes #14 2022-08-29 20:21:37 +03:00
Slavi Pantaleev
e59f5d5502 Make Match() with empty list not return a positive result
Now that we use Match() in allowAdmin() as well, it's awkward to
have it return `true` when called with an empty admin list.
No admins defined was taken to mean "everyone is an admin".

We can either have a `len(users) == 0` check in `allowAdmin` which
rejects the request, or we can change `Match()` so that it doesn't
return positive responses when called with an empty list. Doing the
latter sounds better. It's more natural that matching against an empty list
will yield "no match".
2022-08-29 14:10:52 +03:00
Aine
6623251695 refactored 2022-08-29 12:30:43 +03:00
Slavi Pantaleev
79775c0c13 Add basic mailboxes command
This can be improved in the future, to show some additional information
about each mailbox like:

- "how many users are in that room"
- "which users are in that room"
- "who is the owner of the mailbox"

This can all be done later though.
2022-08-29 10:28:19 +03:00
Slavi Pantaleev
a057654962 Put command access checks on the command level
Checking using `settings.Allowed` is odd. Not all commands are related
to setting configuration settings. Admin commands are coming in the
future, for which this is certainly not the case.

We now do access checks early on (during command processing), so command
handlers can be clean of access checks. If we're inside of a command
handler, the user is privileged to run it.
2022-08-29 10:27:53 +03:00