mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
add share limit (#2827)
This commit is contained in:
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { Button } from 'reactstrap';
|
import { Button } from 'reactstrap';
|
||||||
import Select from 'react-select';
|
import Select from 'react-select';
|
||||||
import makeAnimated from 'react-select/lib/animated';
|
import makeAnimated from 'react-select/lib/animated';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext, isPro } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
import SharePermissionEditor from '../select-editor/share-permission-editor';
|
import SharePermissionEditor from '../select-editor/share-permission-editor';
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ class ShareToGroup extends React.Component {
|
|||||||
};
|
};
|
||||||
this.options = [];
|
this.options = [];
|
||||||
this.permissions = ['rw', 'r', 'cloud-edit', 'preview'];
|
this.permissions = ['rw', 'r', 'cloud-edit', 'preview'];
|
||||||
if (this.props.isGroupOwnedRepo) {
|
if (this.props.isGroupOwnedRepo || !isPro) {
|
||||||
this.permissions = ['rw', 'r'];
|
this.permissions = ['rw', 'r'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import AsyncSelect from 'react-select/lib/Async';
|
import AsyncSelect from 'react-select/lib/Async';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext, isPro } from '../../utils/constants';
|
||||||
import { Button } from 'reactstrap';
|
import { Button } from 'reactstrap';
|
||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
import SharePermissionEditor from '../select-editor/share-permission-editor';
|
import SharePermissionEditor from '../select-editor/share-permission-editor';
|
||||||
@@ -101,7 +101,7 @@ class ShareToUser extends React.Component {
|
|||||||
};
|
};
|
||||||
this.options = [];
|
this.options = [];
|
||||||
this.permissions = ['rw', 'r', 'admin', 'cloud-edit', 'preview'];
|
this.permissions = ['rw', 'r', 'admin', 'cloud-edit', 'preview'];
|
||||||
if (this.props.isGroupOwnedRepo) {
|
if (this.props.isGroupOwnedRepo || !isPro) {
|
||||||
this.permissions = ['rw', 'r'];
|
this.permissions = ['rw', 'r'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user