mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 15:38: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:
@@ -41,6 +41,13 @@ class DevicesTest(BaseTestCase):
|
||||
json_resp = json.loads(resp.content)
|
||||
assert len(json_resp['devices']) == 2
|
||||
|
||||
def test_no_permission(self):
|
||||
self.logout()
|
||||
self.login_as(self.admin_no_other_permission)
|
||||
url = reverse('api-v2.1-admin-devices')
|
||||
resp = self.client.get(url)
|
||||
assert resp.status_code == 403
|
||||
|
||||
def test_can_get_desktop(self):
|
||||
self.login_as(self.admin)
|
||||
url = reverse('api-v2.1-admin-devices') + '?platform=desktop'
|
||||
|
Reference in New Issue
Block a user