Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add a config option to block all room invites #2457

Merged
merged 3 commits into from
Sep 19, 2017
Merged

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Sep 19, 2017

  • allows sysadmins the ability to lock down their servers so that people can't
    send their users room invites.

- allows sysadmins the ability to lock down their servers so that people can't
send their users room invites.
if (effective_membership_state == "invite" and
self.hs.config.block_non_admin_invites):
is_requester_admin = \
yield self.auth.is_server_admin(requester.user)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually we prefer:

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

if possible, but meh

@erikjohnston
Copy link
Member

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

@richvdh richvdh merged commit aa620d0 into develop Sep 19, 2017
@hawkowl hawkowl deleted the rav/block_invites branch September 20, 2018 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants