|
|
@@ -308,7 +308,9 @@ class LoginAndPermissionMiddleware(MiddlewareMixin):
|
|
|
if request.path in ['/oidc/authenticate/', '/oidc/callback/', '/oidc/logout/', '/hue/oidc_failed/']:
|
|
|
return None
|
|
|
|
|
|
- if request.path.startswith('/api/'):
|
|
|
+ if AUTH.AUTO_LOGIN_ENABLED.get() and request.path.startswith('/api/token/auth'):
|
|
|
+ pass # allow /api/token/auth can create user or make it active
|
|
|
+ elif request.path.startswith('/api/'):
|
|
|
return None
|
|
|
|
|
|
# Skip views not requiring login
|