mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-27 03:55:17 -04:00
Make /directory/room/<alias> handle restrictive power levels
Fixes a bug where the alias would be added, but `PUT /directory/room/<alias>` would return a 403.
This commit is contained in:
parent
b36095ae5c
commit
dcd85b976d
1 changed files with 6 additions and 1 deletions
|
@ -151,7 +151,12 @@ class DirectoryHandler(BaseHandler):
|
||||||
|
|
||||||
yield self._create_association(room_alias, room_id, servers, creator=user_id)
|
yield self._create_association(room_alias, room_id, servers, creator=user_id)
|
||||||
if send_event:
|
if send_event:
|
||||||
|
try:
|
||||||
yield self.send_room_alias_update_event(requester, room_id)
|
yield self.send_room_alias_update_event(requester, room_id)
|
||||||
|
except AuthError as e:
|
||||||
|
# sending the aliases event may fail due to the user not having
|
||||||
|
# permission in the room; this is permitted.
|
||||||
|
logger.info("Skipping updating aliases event due to auth error %s", e)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def delete_association(self, requester, room_alias, send_event=True):
|
def delete_association(self, requester, room_alias, send_event=True):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue