mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 23:29:49 +00:00
Squashed commit of the following:
commit 8ac4cd167993b4be4249fa28368b0c869852585b Author: llj <lingjun.li1@gmail.com> Date: Thu Aug 30 16:38:15 2018 +0800 [share link] fixup & improvement for 'permission & copy'; added 'copy' for upload link commit f318353797d6479bb8c5bc2c3d20b05ca2ac5b70 Author: lian <imwhatiam123@gmail.com> Date: Wed Aug 29 13:44:23 2018 +0800 update commit bcadd6c3b708f1c672df3873b22816be1eea195d Author: lian <imwhatiam123@gmail.com> Date: Wed Aug 29 11:49:49 2018 +0800 add can_edit permission when generate share link
This commit is contained in:
@@ -122,7 +122,7 @@ class ShareLinksTest(BaseTestCase):
|
||||
|
||||
json_str = json.dumps({'path': self.file_path, 'repo_id': self.repo_id,
|
||||
'permissions': {
|
||||
'can_preview': True,
|
||||
'can_edit': False,
|
||||
'can_download': True
|
||||
}})
|
||||
resp = self.client.post(self.url, json_str,
|
||||
@@ -137,7 +137,7 @@ class ShareLinksTest(BaseTestCase):
|
||||
assert json_resp['token'] in json_resp['link']
|
||||
assert 'f' in json_resp['link']
|
||||
|
||||
assert json_resp['permissions']['can_preview'] is True
|
||||
assert json_resp['permissions']['can_edit'] is False
|
||||
assert json_resp['permissions']['can_download'] is True
|
||||
|
||||
self._remove_share_link(json_resp['token'])
|
||||
@@ -147,8 +147,8 @@ class ShareLinksTest(BaseTestCase):
|
||||
|
||||
json_str = json.dumps({'path': self.file_path, 'repo_id': self.repo_id,
|
||||
'permissions': {
|
||||
'can_previewxxx': True,
|
||||
'can_downloadyyy': False
|
||||
'can_editrrr': False,
|
||||
'can_downloadrrr': True
|
||||
}})
|
||||
resp = self.client.post(self.url, json_str,
|
||||
content_type="application/json")
|
||||
@@ -162,7 +162,7 @@ class ShareLinksTest(BaseTestCase):
|
||||
assert json_resp['token'] in json_resp['link']
|
||||
assert 'f' in json_resp['link']
|
||||
|
||||
assert json_resp['permissions']['can_preview'] is True
|
||||
assert json_resp['permissions']['can_edit'] is False
|
||||
assert json_resp['permissions']['can_download'] is True
|
||||
|
||||
self._remove_share_link(json_resp['token'])
|
||||
@@ -172,7 +172,7 @@ class ShareLinksTest(BaseTestCase):
|
||||
|
||||
json_str = json.dumps({'path': self.file_path, 'repo_id': self.repo_id,
|
||||
'permissions': {
|
||||
'can_preview': True,
|
||||
'can_edit': False,
|
||||
'can_download': False
|
||||
}})
|
||||
resp = self.client.post(self.url, json_str,
|
||||
@@ -187,7 +187,7 @@ class ShareLinksTest(BaseTestCase):
|
||||
assert json_resp['token'] in json_resp['link']
|
||||
assert 'f' in json_resp['link']
|
||||
|
||||
assert json_resp['permissions']['can_preview'] is True
|
||||
assert json_resp['permissions']['can_edit'] is False
|
||||
assert json_resp['permissions']['can_download'] is False
|
||||
|
||||
self._remove_share_link(json_resp['token'])
|
||||
|
Reference in New Issue
Block a user