1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-02 07:47:32 +00:00

Merge pull request #3966 from haiwen/fix-dtable-asset-access

support other type asset
This commit is contained in:
王健辉 2019-08-09 02:32:34 -05:00 committed by GitHub
commit 471b03bacd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,12 +82,7 @@ def dtable_asset_access(request, workspace_id, dtable_id, path):
2. group member
3. shared user with `rw` or `admin` permission
"""
# asset file type check
asset_name = os.path.basename(normalize_file_path(path))
file_type, file_ext = get_file_type_and_ext(asset_name)
if file_type != IMAGE:
err_msg = 'Invalid file type'
return render_error(request, err_msg)
# resource check
workspace = Workspaces.objects.get_workspace_by_id(workspace_id)