mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-29 04:01:24 +00:00
Merge branch '11.0'
This commit is contained in:
commit
316e403202
@ -50,6 +50,7 @@ class GroupItem extends React.Component {
|
|||||||
currentPermission={currentPermission}
|
currentPermission={currentPermission}
|
||||||
permissions={this.props.permissions}
|
permissions={this.props.permissions}
|
||||||
onPermissionChanged={this.onChangeUserPermission}
|
onPermissionChanged={this.onChangeUserPermission}
|
||||||
|
isSysAdmin={true}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -262,6 +263,7 @@ class SysAdminShareToGroup extends React.Component {
|
|||||||
currentPermission={this.state.permission}
|
currentPermission={this.state.permission}
|
||||||
permissions={this.permissions}
|
permissions={this.permissions}
|
||||||
onPermissionChanged={this.setPermission}
|
onPermissionChanged={this.setPermission}
|
||||||
|
isSysAdmin={true}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -50,6 +50,7 @@ class UserItem extends React.Component {
|
|||||||
currentPermission={currentPermission}
|
currentPermission={currentPermission}
|
||||||
permissions={this.props.permissions}
|
permissions={this.props.permissions}
|
||||||
onPermissionChanged={this.onChangeUserPermission}
|
onPermissionChanged={this.onChangeUserPermission}
|
||||||
|
isSysAdmin={true}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -248,6 +249,7 @@ class SysAdminShareToUser extends React.Component {
|
|||||||
currentPermission={this.state.permission}
|
currentPermission={this.state.permission}
|
||||||
permissions={this.permissions}
|
permissions={this.permissions}
|
||||||
onPermissionChanged={this.setPermission}
|
onPermissionChanged={this.setPermission}
|
||||||
|
isSysAdmin={true}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -19,6 +19,7 @@ const propTypes = {
|
|||||||
onPermissionChanged: PropTypes.func.isRequired,
|
onPermissionChanged: PropTypes.func.isRequired,
|
||||||
enableAddCustomPermission: PropTypes.bool,
|
enableAddCustomPermission: PropTypes.bool,
|
||||||
onAddCustomPermissionToggle: PropTypes.func,
|
onAddCustomPermissionToggle: PropTypes.func,
|
||||||
|
isSysAdmin: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
class SharePermissionEditor extends React.Component {
|
class SharePermissionEditor extends React.Component {
|
||||||
@ -56,7 +57,14 @@ class SharePermissionEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listCustomPermissions = () => {
|
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);
|
const cacheData = localStorage.getItem(this.CACHE_KEY);
|
||||||
if (cacheData) {
|
if (cacheData) {
|
||||||
const { permission_list: permissions } = JSON.parse(cacheData);
|
const { permission_list: permissions } = JSON.parse(cacheData);
|
||||||
|
@ -16,8 +16,6 @@ from shibboleth.app_settings import SHIB_ATTRIBUTE_MAP, LOGOUT_SESSION_KEY, \
|
|||||||
|
|
||||||
from seahub import auth
|
from seahub import auth
|
||||||
from seahub.base.accounts import User
|
from seahub.base.accounts import User
|
||||||
from seahub.auth.models import SocialAuthUser
|
|
||||||
from seahub.base.sudo_mode import update_sudo_mode_ts
|
|
||||||
from seahub.profile.models import Profile
|
from seahub.profile.models import Profile
|
||||||
from seahub.utils.file_size import get_quota_from_string
|
from seahub.utils.file_size import get_quota_from_string
|
||||||
from seahub.role_permissions.utils import get_enabled_role_permissions_by_role
|
from seahub.role_permissions.utils import get_enabled_role_permissions_by_role
|
||||||
@ -179,7 +177,7 @@ class ShibbolethRemoteUserMiddleware(RemoteUserMiddleware):
|
|||||||
p.nickname = nickname.encode("iso-8859-1").decode('utf8')
|
p.nickname = nickname.encode("iso-8859-1").decode('utf8')
|
||||||
|
|
||||||
if institution:
|
if institution:
|
||||||
p.institution = institution
|
p.institution = institution.encode("iso-8859-1").decode('utf8')
|
||||||
|
|
||||||
if contact_email:
|
if contact_email:
|
||||||
p.contact_email = contact_email
|
p.contact_email = contact_email
|
||||||
|
Loading…
Reference in New Issue
Block a user