mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-13 15:05:30 +00:00
Admin share permissions (#6603)
* update * update * update * Update urls.py * Update share-permission-editor.js
This commit is contained in:
parent
f356e5b85a
commit
a2cd02f007
@ -50,6 +50,7 @@ class GroupItem extends React.Component {
|
||||
currentPermission={currentPermission}
|
||||
permissions={this.props.permissions}
|
||||
onPermissionChanged={this.onChangeUserPermission}
|
||||
isSysAdmin={true}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
@ -262,6 +263,7 @@ class SysAdminShareToGroup extends React.Component {
|
||||
currentPermission={this.state.permission}
|
||||
permissions={this.permissions}
|
||||
onPermissionChanged={this.setPermission}
|
||||
isSysAdmin={true}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -50,6 +50,7 @@ class UserItem extends React.Component {
|
||||
currentPermission={currentPermission}
|
||||
permissions={this.props.permissions}
|
||||
onPermissionChanged={this.onChangeUserPermission}
|
||||
isSysAdmin={true}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
@ -249,6 +250,7 @@ class SysAdminShareToUser extends React.Component {
|
||||
currentPermission={this.state.permission}
|
||||
permissions={this.permissions}
|
||||
onPermissionChanged={this.setPermission}
|
||||
isSysAdmin={true}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -18,6 +18,7 @@ const propTypes = {
|
||||
onPermissionChanged: PropTypes.func.isRequired,
|
||||
enableAddCustomPermission: PropTypes.bool,
|
||||
onAddCustomPermissionToggle: PropTypes.func,
|
||||
isSysAdmin: PropTypes.bool,
|
||||
};
|
||||
|
||||
class SharePermissionEditor extends React.Component {
|
||||
@ -55,7 +56,14 @@ class SharePermissionEditor extends React.Component {
|
||||
}
|
||||
|
||||
listCustomPermissions = () => {
|
||||
const { repoID } = this.props;
|
||||
const { repoID, isSysAdmin } = this.props;
|
||||
if (isSysAdmin) {
|
||||
this.setState({
|
||||
isLoading: false,
|
||||
customPermissions: []
|
||||
});
|
||||
return;
|
||||
}
|
||||
const cacheData = localStorage.getItem(this.CACHE_KEY);
|
||||
if (cacheData) {
|
||||
const { permission_list: permissions } = JSON.parse(cacheData);
|
||||
|
Loading…
Reference in New Issue
Block a user