summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorreivilibre <38398653+reivilibre@users.noreply.github.com>2021-07-30 12:34:21 +0100
committerGitHub <noreply@github.com>2021-07-30 12:34:21 +0100
commitc167e09fe58d3a256fb1c763b391ad6633d2507d (patch)
tree60e45bc5176056cc1e526d91a091a04e44c09b1b /synapse
parentRemove shebang line from module files (#10415) (diff)
downloadsynapse-c167e09fe58d3a256fb1c763b391ad6633d2507d.tar.xz
Fix explicit assignment of PL 0 from being misinterpreted in rare circumstances (#10499)
Diffstat (limited to '')
-rw-r--r--synapse/event_auth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/event_auth.py b/synapse/event_auth.py
index 0fa7ffc99f..4c92e9a2d4 100644
--- a/synapse/event_auth.py
+++ b/synapse/event_auth.py
@@ -692,7 +692,7 @@ def get_user_power_level(user_id: str, auth_events: StateMap[EventBase]) -> int:
     power_level_event = get_power_level_event(auth_events)
     if power_level_event:
         level = power_level_event.content.get("users", {}).get(user_id)
-        if not level:
+        if level is None:
             level = power_level_event.content.get("users_default", 0)
 
         if level is None: