Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add a config option to block all room invites #2457

Merged
merged 3 commits into from Sep 19, 2017

Conversation

Projects
None yet
2 participants
Member

richvdh commented Sep 19, 2017

  • allows sysadmins the ability to lock down their servers so that people can't
    send their users room invites.
Add a config option to block all room invites
- allows sysadmins the ability to lock down their servers so that people can't
send their users room invites.
synapse/handlers/room_member.py
+ if (effective_membership_state == "invite" and
+ self.hs.config.block_non_admin_invites):
+ is_requester_admin = \
+ yield self.auth.is_server_admin(requester.user)
@erikjohnston

erikjohnston Sep 19, 2017

Owner

usually we prefer:

is_requester_admin = yield self.auth.is_server_admin(
    requester.user
)

if possible, but meh

Owner

erikjohnston commented Sep 19, 2017

Looks like you'll need to fix up the tests (or change the config to disable invites only if the thing is falsey)

richvdh added some commits Sep 19, 2017

@richvdh richvdh merged commit aa620d0 into develop Sep 19, 2017

8 checks passed

Sytest Dendron (Commit) Build #2590 origin/rav/block_invites succeeded in 4 min 54 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #3424 origin/rav/block_invites succeeded in 4 min 26 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #3518 origin/rav/block_invites succeeded in 1 min 50 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment