mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:56:05 -04:00
Add a config option to block all room invites (#2457)
- allows sysadmins the ability to lock down their servers so that people can't send their users room invites.
This commit is contained in:
parent
2eabdf3f98
commit
aa620d09a0
5 changed files with 44 additions and 0 deletions
|
@ -519,6 +519,14 @@ class Auth(object):
|
|||
)
|
||||
|
||||
def is_server_admin(self, user):
|
||||
""" Check if the given user is a local server admin.
|
||||
|
||||
Args:
|
||||
user (str): mxid of user to check
|
||||
|
||||
Returns:
|
||||
bool: True if the user is an admin
|
||||
"""
|
||||
return self.store.is_server_admin(user)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue