1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 05:39:59 +00:00

admin api role check (#4353)

* admin api role check

* add check to new tabs and tests

* fix work-weixin virus scan check
This commit is contained in:
Leo
2019-12-16 18:31:29 +08:00
committed by lian
parent 44459bb36b
commit 7df1192cbf
84 changed files with 1089 additions and 142 deletions

View File

@@ -23,6 +23,12 @@ class AdminSystemLibraryTest(BaseTestCase):
resp = self.client.get(self.url)
self.assertEqual(403, resp.status_code)
def test_get_admin_permission_denied(self):
self.login_as(self.admin_cannot_manage_library)
resp = self.client.get(self.url)
self.assertEqual(403, resp.status_code)
class AdminSystemLibraryUploadLinkTest(BaseTestCase):
def setUp(self):
@@ -44,3 +50,7 @@ class AdminSystemLibraryUploadLinkTest(BaseTestCase):
resp = self.client.get(self.url)
self.assertEqual(403, resp.status_code)
def test_get_admin_permission_denied(self):
self.login_as(self.admin_cannot_manage_library)
resp = self.client.get(self.url)
self.assertEqual(403, resp.status_code)