mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 15:19:06 +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)
|
||||
|
||||
def process_request(self, request):
|
||||
if request.path.rstrip('/') != settings.SITE_ROOT + 'sso':
|
||||
return
|
||||
|
||||
# AuthenticationMiddleware is required so that request.user exists.
|
||||
if not hasattr(request, 'user'):
|
||||
raise ImproperlyConfigured(
|
||||
|
Reference in New Issue
Block a user