Commit Graph

5 Commits

Author SHA1 Message Date
Matthew Wild 457096a13d mod_snikket_restricted_users: Don't isolate users with no roles
The code was originally written to fail safe in the event of failure, hence
the 'if roles and ...'. However a user with no roles (which is normal for a
normal user, especially on upgrade) can return nil.

Failure is signified by 'false', so now we explicitly catch this and return
early without bypassing isolation. Users with no roles (nil) or with roles
but not prosody:restricted bypass isolation.
2021-11-10 17:27:09 +00:00
Matthew Wild a5084a289e mod_snikket_restricted_users: Add some explanatory comments 2021-11-09 12:28:50 +00:00
Matthew Wild d47a6ddbc0 mod_snikket_restricted_users: Use event.actor, which is preferred and always present 2021-11-09 11:23:49 +00:00
Matthew Wild 0294b0e7e0 prosody: Prevent restricted users from creating public channels (#37) 2021-11-08 16:13:07 +00:00
Matthew Wild 5dddfeb876 prosody: Prevent federation for users with prosody:restricted role (#37) 2021-11-08 12:51:14 +00:00