1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 06:11:16 +00:00

Merge branch '7.0'

This commit is contained in:
plt
2019-10-21 16:44:49 +08:00
26 changed files with 197 additions and 125 deletions

View File

@@ -13,9 +13,6 @@ from seahub.wiki.models import Wiki
from seahub.role_permissions.settings import ENABLED_ROLE_PERMISSIONS
from seahub.test_utils import BaseTestCase
TEST_CAN_USE_WIKI_FALSE = copy.deepcopy(ENABLED_ROLE_PERMISSIONS)
TEST_CAN_USE_WIKI_FALSE['default']['can_use_wiki'] = False
TEST_CAN_PUBLISH_REPO_FALSE = copy.deepcopy(ENABLED_ROLE_PERMISSIONS)
TEST_CAN_PUBLISH_REPO_FALSE['default']['can_publish_repo'] = False
@@ -96,13 +93,6 @@ class WikisViewTest(BaseTestCase):
})
self.assertEqual(403, resp.status_code)
def test_403_when_add_wiki_with_can_use_wiki_false(self):
with patch('seahub.role_permissions.utils.ENABLED_ROLE_PERMISSIONS', TEST_CAN_USE_WIKI_FALSE):
resp = self.client.post(self.url, {
'repo_id': self.repo.id,
})
self.assertEqual(403, resp.status_code)
def test_403_when_add_wiki_with_can_generate_share_link_false(self):
with patch('seahub.role_permissions.utils.ENABLED_ROLE_PERMISSIONS', TEST_CAN_GENERATE_SHARE_LINK):
resp = self.client.post(self.url, {