mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-21 08:25:21 +00:00
parent
57c8fa967c
commit
62c2f0bc9e
@ -18,18 +18,21 @@ from seahub.base.accounts import User
|
||||
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.utils.user_permissions import get_user_role
|
||||
|
||||
# Get an instance of a logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
conf_dir = os.environ['SEAFILE_CENTRAL_CONF_DIR']
|
||||
sys.path.append(conf_dir)
|
||||
try:
|
||||
from seahub_custom_functions import custom_shibboleth_get_user_role
|
||||
CUSTOM_SHIBBOLETH_GET_USER_ROLE = True
|
||||
except ImportError as e:
|
||||
except ImportError:
|
||||
CUSTOM_SHIBBOLETH_GET_USER_ROLE = False
|
||||
except KeyError:
|
||||
CUSTOM_SHIBBOLETH_GET_USER_ROLE = False
|
||||
|
||||
|
||||
class ShibbolethRemoteUserMiddleware(RemoteUserMiddleware):
|
||||
"""
|
||||
@ -253,5 +256,6 @@ class ShibbolethRemoteUserMiddleware(RemoteUserMiddleware):
|
||||
error = True
|
||||
return shib_attrs, error
|
||||
|
||||
|
||||
class ShibbolethValidationError(Exception):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user