mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
Determine whether the hidden link is hidden by the permission of the generated link
This commit is contained in:
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
import { Button, Form, FormGroup, Label, Input, InputGroup, InputGroupAddon, Alert } from 'reactstrap';
|
import { Button, Form, FormGroup, Label, Input, InputGroup, InputGroupAddon, Alert } from 'reactstrap';
|
||||||
import { gettext, shareLinkExpireDaysMin, shareLinkExpireDaysMax, shareLinkExpireDaysDefault, shareLinkPasswordMinLength, canDownload } from '../../utils/constants';
|
import { gettext, shareLinkExpireDaysMin, shareLinkExpireDaysMax, shareLinkExpireDaysDefault, shareLinkPasswordMinLength } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import SharedLinkInfo from '../../models/shared-link-info';
|
import SharedLinkInfo from '../../models/shared-link-info';
|
||||||
@@ -307,7 +307,7 @@ class GenerateShareLink extends React.Component {
|
|||||||
}
|
}
|
||||||
</dd>
|
</dd>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
{!sharedLinkInfo.is_dir && canDownload && ( //just for file
|
{!sharedLinkInfo.is_dir && sharedLinkInfo.permissions.can_download &&( //just for file
|
||||||
<FormGroup className="mb-0">
|
<FormGroup className="mb-0">
|
||||||
<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 className="d-flex">
|
<dd className="d-flex">
|
||||||
|
Reference in New Issue
Block a user