mirror of
https://github.com/haiwen/seahub.git
synced 2025-05-12 18:05:05 +00:00
Merge branch '11.0'
This commit is contained in:
commit
316e403202
frontend/src/components
dialog/sysadmin-dialog
select-editor
thirdpart/shibboleth
@ -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>
|
||||
@ -248,6 +249,7 @@ class SysAdminShareToUser extends React.Component {
|
||||
currentPermission={this.state.permission}
|
||||
permissions={this.permissions}
|
||||
onPermissionChanged={this.setPermission}
|
||||
isSysAdmin={true}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -19,6 +19,7 @@ const propTypes = {
|
||||
onPermissionChanged: PropTypes.func.isRequired,
|
||||
enableAddCustomPermission: PropTypes.bool,
|
||||
onAddCustomPermissionToggle: PropTypes.func,
|
||||
isSysAdmin: PropTypes.bool,
|
||||
};
|
||||
|
||||
class SharePermissionEditor extends React.Component {
|
||||
@ -56,7 +57,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);
|
||||
|
@ -16,8 +16,6 @@ from shibboleth.app_settings import SHIB_ATTRIBUTE_MAP, LOGOUT_SESSION_KEY, \
|
||||
|
||||
from seahub import auth
|
||||
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.utils.file_size import get_quota_from_string
|
||||
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')
|
||||
|
||||
if institution:
|
||||
p.institution = institution
|
||||
p.institution = institution.encode("iso-8859-1").decode('utf8')
|
||||
|
||||
if contact_email:
|
||||
p.contact_email = contact_email
|
||||
|
Loading…
Reference in New Issue
Block a user