mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 11:21:29 +00:00
update (#7180)
This commit is contained in:
@@ -53,7 +53,7 @@ class LinkDetails extends React.Component {
|
|||||||
|
|
||||||
onCopyDownloadLink = () => {
|
onCopyDownloadLink = () => {
|
||||||
const { sharedLinkInfo } = this.props;
|
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.'));
|
toaster.success(gettext('Direct download link is copied to the clipboard.'));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ class LinkDetails extends React.Component {
|
|||||||
<dt className="text-secondary font-weight-normal">{gettext('Direct download link')}</dt>
|
<dt className="text-secondary font-weight-normal">{gettext('Direct download link')}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<SharedLink
|
<SharedLink
|
||||||
link={`${sharedLinkInfo.download_link}`}
|
link={`${sharedLinkInfo.download_link}?op=view`}
|
||||||
linkExpired={sharedLinkInfo.is_expired}
|
linkExpired={sharedLinkInfo.is_expired}
|
||||||
copyLink={this.onCopyDownloadLink}
|
copyLink={this.onCopyDownloadLink}
|
||||||
/>
|
/>
|
||||||
|
@@ -95,11 +95,6 @@ class InternalCheckShareLinkAccess(APIView):
|
|||||||
error_msg = 'Permission denied.'
|
error_msg = 'Permission denied.'
|
||||||
return api_error(status.HTTP_403_FORBIDDEN, error_msg)
|
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_id = share_obj.repo_id
|
||||||
repo = seafile_api.get_repo(repo_id)
|
repo = seafile_api.get_repo(repo_id)
|
||||||
if not repo:
|
if not repo:
|
||||||
|
Reference in New Issue
Block a user