mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
[shibboleth] Only apply middleware to certain url
This commit is contained in:
@@ -31,6 +31,9 @@ class ShibbolethRemoteUserMiddleware(RemoteUserMiddleware):
|
|||||||
super(ShibbolethRemoteUserMiddleware, self).__init__(*a, **kw)
|
super(ShibbolethRemoteUserMiddleware, self).__init__(*a, **kw)
|
||||||
|
|
||||||
def process_request(self, request):
|
def process_request(self, request):
|
||||||
|
if request.path.rstrip('/') != settings.SITE_ROOT + 'sso':
|
||||||
|
return
|
||||||
|
|
||||||
# AuthenticationMiddleware is required so that request.user exists.
|
# AuthenticationMiddleware is required so that request.user exists.
|
||||||
if not hasattr(request, 'user'):
|
if not hasattr(request, 'user'):
|
||||||
raise ImproperlyConfigured(
|
raise ImproperlyConfigured(
|
||||||
|
Reference in New Issue
Block a user