mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 16:36:15 +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:
@@ -13,6 +13,13 @@ class SysinfoTest(BaseTestCase):
|
||||
def tearDown(self):
|
||||
self.remove_repo()
|
||||
|
||||
def test_admin_permission_denied(self):
|
||||
self.logout()
|
||||
self.login_as(self.admin_cannot_view_system_info)
|
||||
url = reverse('api-v2.1-sysinfo')
|
||||
resp = self.client.get(url)
|
||||
self.assertEqual(403, resp.status_code)
|
||||
|
||||
@patch('seahub.api2.endpoints.admin.sysinfo.is_pro_version')
|
||||
def test_get_sysinfo_in_community_edition(self, mock_is_pro_version):
|
||||
|
||||
|
Reference in New Issue
Block a user