Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #7180

Merged
merged 1 commit into from
Dec 13, 2024
Merged

update #7180

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading