Commit eaa03e19 authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix opds_middleware (auth)

parent 60084ade
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -23,13 +23,13 @@ class BasicAuthMiddleware(object):
            return
            
        # AuthenticationMiddleware is required so that request.user exists.
        if not hasattr(request, 'user'):
            raise ImproperlyConfigured(
                "The Django remote user auth middleware requires the"
                " authentication middleware to be installed.  Edit your"
                " MIDDLEWARE setting to insert"
                " 'django.contrib.auth.middleware.AuthenticationMiddleware'"
                " before the BasicAuthMiddleware class.")
        #if not hasattr(request, 'user'):
        #    raise ImproperlyConfigured(
        #        "The Django remote user auth middleware requires the"
        #        " authentication middleware to be installed.  Edit your"
        #        " MIDDLEWARE setting to insert"
        #        " 'django.contrib.auth.middleware.AuthenticationMiddleware'"
        #        " before the BasicAuthMiddleware class.")
        try:
            authentication = request.META[self.header]
        except KeyError:
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ STATIC_ROOT = 'static'
SOPDS_ROOT_LIB = os.path.join(BASE_DIR,'opds_catalog//tests//data//')

SOPDS_SINGLE_COMMIT = False
SOPDS_AUTH = False
SOPDS_AUTH = True
SOPDS_SCAN_SHED_MIN ='0'
SOPDS_SCAN_SHED_HOUR ='0,12'