mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Remove u/ requirement
This commit is contained in:
parent
429925a5e9
commit
8ba89f1050
@ -350,9 +350,10 @@ class GroupsServerHandler(object):
|
|||||||
if group:
|
if group:
|
||||||
raise SynapseError(400, "Group already exists")
|
raise SynapseError(400, "Group already exists")
|
||||||
|
|
||||||
|
# TODO: Add config to enforce that only server admins can create rooms
|
||||||
is_admin = yield self.auth.is_server_admin(UserID.from_string(user_id))
|
is_admin = yield self.auth.is_server_admin(UserID.from_string(user_id))
|
||||||
if not is_admin and not group_id.startswith("+u/"):
|
if not is_admin:
|
||||||
raise SynapseError(403, "Group ID must start with '+u/' or be a server admin")
|
raise SynapseError(403, "Only server admin can create group on this server")
|
||||||
|
|
||||||
profile = content.get("profile", {})
|
profile = content.get("profile", {})
|
||||||
name = profile.get("name")
|
name = profile.get("name")
|
||||||
|
Loading…
Reference in New Issue
Block a user