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:
Neil Williams
2014-03-12 13:49:43 -07:00
parent 2d1a5e5495
commit d4c4ff9348

View File

@@ -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)