mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
333 B
11 lines
333 B
4 years ago
|
from django_cas_ng.middleware import CASMiddleware as _CASMiddleware
|
||
|
from django.core.exceptions import MiddlewareNotUsed
|
||
|
from django.conf import settings
|
||
|
|
||
|
|
||
|
class CASMiddleware(_CASMiddleware):
|
||
|
def __init__(self, **kwargs):
|
||
|
super().__init__(**kwargs)
|
||
|
if not settings.AUTH_CAS:
|
||
|
raise MiddlewareNotUsed
|