forked from MirrorHub/synapse
handlers/room_member: fix guest access check when joining rooms
Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
This commit is contained in:
parent
c18f7fc410
commit
1ef6084b75
1 changed files with 6 additions and 4 deletions
|
@ -232,7 +232,9 @@ class RoomMemberHandler(BaseHandler):
|
||||||
is_host_in_room = yield self._is_host_in_room(current_state_ids)
|
is_host_in_room = yield self._is_host_in_room(current_state_ids)
|
||||||
|
|
||||||
if effective_membership_state == Membership.JOIN:
|
if effective_membership_state == Membership.JOIN:
|
||||||
if requester.is_guest and not self._can_guest_join(current_state_ids):
|
if requester.is_guest:
|
||||||
|
guest_can_join = yield self._can_guest_join(current_state_ids)
|
||||||
|
if not guest_can_join:
|
||||||
# This should be an auth check, but guests are a local concept,
|
# This should be an auth check, but guests are a local concept,
|
||||||
# so don't really fit into the general auth process.
|
# so don't really fit into the general auth process.
|
||||||
raise AuthError(403, "Guest access not allowed")
|
raise AuthError(403, "Guest access not allowed")
|
||||||
|
|
Loading…
Reference in a new issue