summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-02 12:11:52 +0100
committerErik Johnston <erik@matrix.org>2014-09-02 12:12:14 +0100
commit4b8244fbf85df081e3abfa7a8e8754b66d671f49 (patch)
tree7f4990fb341949eb4f081000c3c7c077ceb51fd9 /synapse/api
parentWhoops: Put /events parameters object in the right part of the api tree. (diff)
downloadsynapse-4b8244fbf85df081e3abfa7a8e8754b66d671f49.tar.xz
Fix bug where we didn't correctly store the ops power levels event.
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/auth.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index e9e3279b9a..54ecbe5b3a 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -169,6 +169,11 @@ class Auth(object):
                 )
                 _, kick_level = yield self.store.get_ops_levels(event.room_id)
 
+                if kick_level:
+                    kick_level = int(kick_level)
+                else:
+                    kick_level = 5
+
                 if user_level < kick_level:
                     raise AuthError(
                         403, "You cannot kick user %s." % target_user_id