mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Permissions: fix serialization of superuser permissions.
JSON serialization of a superuser permission set would return {all:
false} because of the way __getitem__ works.
This commit is contained in:
@@ -66,7 +66,7 @@ class PermissionSet(dict):
|
||||
|
||||
def __getitem__(self, key):
|
||||
if self.info and self.is_superuser():
|
||||
return key in self.info
|
||||
return key == self.ALL or key in self.info
|
||||
return super(PermissionSet, self).get(key, False)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user