Skip to content

Commit

Permalink
Admin share permissions (#6603)
Browse files Browse the repository at this point in the history
* update

* update

* update

* Update urls.py

* Update share-permission-editor.js
  • Loading branch information
r350178982 authored Aug 21, 2024
1 parent f356e5b commit a2cd02f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class GroupItem extends React.Component {
currentPermission={currentPermission}
permissions={this.props.permissions}
onPermissionChanged={this.onChangeUserPermission}
isSysAdmin={true}
/>
</td>
<td>
Expand Down Expand Up @@ -262,6 +263,7 @@ class SysAdminShareToGroup extends React.Component {
currentPermission={this.state.permission}
permissions={this.permissions}
onPermissionChanged={this.setPermission}
isSysAdmin={true}
/>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class UserItem extends React.Component {
currentPermission={currentPermission}
permissions={this.props.permissions}
onPermissionChanged={this.onChangeUserPermission}
isSysAdmin={true}
/>
</td>
<td>
Expand Down Expand Up @@ -249,6 +250,7 @@ class SysAdminShareToUser extends React.Component {
currentPermission={this.state.permission}
permissions={this.permissions}
onPermissionChanged={this.setPermission}
isSysAdmin={true}
/>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const propTypes = {
onPermissionChanged: PropTypes.func.isRequired,
enableAddCustomPermission: PropTypes.bool,
onAddCustomPermissionToggle: PropTypes.func,
isSysAdmin: PropTypes.bool,
};

class SharePermissionEditor extends React.Component {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a2cd02f

Please sign in to comment.