def test_filter_public_permissions(self): """Check that public user cannot get to open permissions""" data = {"public": "view"} check_public_permissions(data) data = {"public": "edit"} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {"public": "share"} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {"public": "owner"} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data)
def test_filter_public_permissions(self): """Check that public user cannot get to open permissions""" data = {'public': {'add': ['view']}} check_public_permissions(data) data = {'public': {'add': ['download']}} check_public_permissions(data) data = {'public': {'add': ['add']}} check_public_permissions(data) data = {'public': {'add': ['edit']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {'public': {'add': ['share']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {'public': {'add': ['owner']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {'public': {'add': ['view', 'edit']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data)
def test_filter_public_permissions(self): """Check that public user cannot get to open permissions""" data = {'public': {'add': ['view']}} check_public_permissions(data) data = {'public': {'add': ['download']}} check_public_permissions(data) data = {'public': {'add': ['add']}} check_public_permissions(data) data = {'public': {'add': ['edit']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {'public': {'add': ['share']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {'public': {'add': ['owner']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data) data = {'public': {'add': ['view', 'edit']}} with self.assertRaises(exceptions.PermissionDenied): check_public_permissions(data)