Skip to content

Commit

Permalink
update download-info api
Browse files Browse the repository at this point in the history
  • Loading branch information
imwhatiam committed May 31, 2024
1 parent c0f7fe9 commit 856597f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions seahub/api2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1590,10 +1590,10 @@ def get(self, request, repo_id, format=None):
is_syncable = resp_json['is_syncable']
forbidden_path = resp_json.get('forbidden_path', '')

if 'seadrive' in request.META.get('HTTP_USER_AGENT', '').lower() and \
not is_syncable and forbidden_path == '/':
error_msg = 'unsyncable share permission'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
if 'seadrive' in request.META.get('HTTP_USER_AGENT', '').lower():
if not is_syncable and forbidden_path == '/':
error_msg = 'unsyncable share permission'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
else:
if not is_syncable:
error_msg = 'unsyncable share permission'
Expand Down

0 comments on commit 856597f

Please sign in to comment.