Exemple #1
0
 def permissions_form(self):
     from r2.lib.permissions import ModeratorPermissionSet
     from r2.lib.pages import ModeratorPermissions
     return ModeratorPermissions(
         user=None,
         permissions_type=self.type,
         permissions=ModeratorPermissionSet(all=True),
         editable=True,
         embedded=True,
     )
Exemple #2
0
 def test_loads(self):
     self.assertTrue(ModeratorPermissionSet.loads(None).is_superuser())
     self.assertFalse(ModeratorPermissionSet.loads('').is_superuser())
Exemple #3
0
 def test_loads(self):
     self.assertTrue(ModeratorPermissionSet.loads(None).is_superuser())
     self.assertFalse(ModeratorPermissionSet.loads('').is_superuser())