Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
r350178982 committed Dec 12, 2024
1 parent e87e1a0 commit d5cf8bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/share-link-panel/link-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class LinkDetails extends React.Component {

onCopyDownloadLink = () => {
const { sharedLinkInfo } = this.props;
copy(`${sharedLinkInfo.download_link}`);
copy(`${sharedLinkInfo.download_link}?op=view`);
toaster.success(gettext('Direct download link is copied to the clipboard.'));
};

Expand Down Expand Up @@ -182,7 +182,7 @@ class LinkDetails extends React.Component {
<dt className="text-secondary font-weight-normal">{gettext('Direct download link')}</dt>
<dd>
<SharedLink
link={`${sharedLinkInfo.download_link}`}
link={`${sharedLinkInfo.download_link}?op=view`}
linkExpired={sharedLinkInfo.is_expired}
copyLink={this.onCopyDownloadLink}
/>
Expand Down
5 changes: 0 additions & 5 deletions seahub/api2/endpoints/internal_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ def post(self, request):
error_msg = 'Permission denied.'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)

can_download = share_obj.get_permissions()['can_download']
if not can_download:
error_msg = 'Permission denied.'
return api_error(status.HTTP_403_FORBIDDEN, error_msg)

repo_id = share_obj.repo_id
repo = seafile_api.get_repo(repo_id)
if not repo:
Expand Down

0 comments on commit d5cf8bd

Please sign in to comment.