Relocate AUTH_TOKEN_* settings reference

This commit is contained in:
Matthew Jones
2015-12-15 15:37:26 -05:00
parent e97e60bd30
commit dfd1ca4ae9
5 changed files with 12 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ from rest_framework import HTTP_HEADER_ENCODING
# AWX
from awx.main.models import UnifiedJob, AuthToken
from awx.main.conf import tower_settings
class TokenAuthentication(authentication.TokenAuthentication):
'''
@@ -90,7 +90,7 @@ class TokenAuthentication(authentication.TokenAuthentication):
# Token invalidated due to session limit config being reduced
# Session limit reached invalidation will also take place on authentication
if settings.AUTH_TOKEN_PER_USER != -1:
if tower_settings.AUTH_TOKEN_PER_USER != -1:
if not token.in_valid_tokens(now=now):
token.invalidate(reason='limit_reached')
raise exceptions.AuthenticationFailed(AuthToken.reason_long('limit_reached'))