mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 23:29:49 +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:
@@ -72,6 +72,15 @@ class OrgReposTest(BaseTestCase):
|
||||
for repo in json_resp['repo_list']:
|
||||
assert repo['org_id'] == self.org_id
|
||||
|
||||
def test_no_permission(self):
|
||||
|
||||
if not LOCAL_PRO_DEV_ENV:
|
||||
return
|
||||
|
||||
self.login_as(self.admin_no_other_permission)
|
||||
resp = self.client.get(self.org_repos_url)
|
||||
self.assertEqual(403, resp.status_code)
|
||||
|
||||
def test_can_not_get_repos_if_not_admin(self):
|
||||
|
||||
if not LOCAL_PRO_DEV_ENV:
|
||||
|
Reference in New Issue
Block a user