summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-03-04 11:30:46 -0500
committerGitHub <noreply@github.com>2020-03-04 11:30:46 -0500
commit13892776ef7e0b1af2f82c9ca53f7bbd1c60d66f (patch)
tree8feb9bd4b45a2438030338984eda3dfbb4ed21d1 /synapse/api
parentRead the room version from database when fetching events (#6874) (diff)
downloadsynapse-13892776ef7e0b1af2f82c9ca53f7bbd1c60d66f.tar.xz
Allow deleting an alias if the user has sufficient power level (#6986)
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/auth.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py

index 5ca18b4301..c1ade1333b 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py
@@ -539,7 +539,7 @@ class Auth(object): @defer.inlineCallbacks def check_can_change_room_list(self, room_id: str, user: UserID): - """Check if the user is allowed to edit the room's entry in the + """Determine whether the user is allowed to edit the room's entry in the published room list. Args: @@ -570,12 +570,7 @@ class Auth(object): ) user_level = event_auth.get_user_power_level(user_id, auth_events) - if user_level < send_level: - raise AuthError( - 403, - "This server requires you to be a moderator in the room to" - " edit its room list entry", - ) + return user_level >= send_level @staticmethod def has_access_token(request):