1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

add repo encryption check in old create share link api

This commit is contained in:
ilearnit
2019-04-17 07:15:12 +00:00
parent b83f2b9491
commit 210a3e15ee

View File

@@ -3252,6 +3252,10 @@ class FileSharedLinkView(APIView):
if not repo:
return api_error(status.HTTP_404_NOT_FOUND, "Library does not exist")
if repo.encrypted:
error_msg = 'Permission denied.'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
path = request.data.get('p', None)
if not path:
return api_error(status.HTTP_400_BAD_REQUEST, 'Path is missing')