Merge branch 'william' into 'master'

updated for read vm realm

See merge request ungleich-public/dynamicweb!706
This commit is contained in:
pcoder116 2019-05-16 22:40:18 +02:00
commit 6ac9d2fb1e
2 changed files with 2 additions and 2 deletions

View file

@ -721,7 +721,7 @@ X_FRAME_OPTIONS = ('SAMEORIGIN' if X_FRAME_OPTIONS_ALLOW_FROM_URI is None else
DEBUG = bool_env('DEBUG') DEBUG = bool_env('DEBUG')
ACCOUNT_NAME = env('ACCOUNT_NAME') READ_VM_REALM = env('READ_VM_REALM')
AUTH_NAME = env('AUTH_NAME') AUTH_NAME = env('AUTH_NAME')
AUTH_SEED = env('AUTH_SEED') AUTH_SEED = env('AUTH_SEED')
AUTH_REALM = env('AUTH_REALM') AUTH_REALM = env('AUTH_REALM')

View file

@ -1773,7 +1773,7 @@ class CheckUserVM(APIView):
user = request.data['user'] user = request.data['user']
realm = request.data['realm'] realm = request.data['realm']
token = request.data['token'] token = request.data['token']
if user != settings.ACCOUNT_NAME: if realm != settings.READ_VM_REALM:
return Response("User not allowed", 403) return Response("User not allowed", 403)
response = check_otp(user, realm, token) response = check_otp(user, realm, token)
if response != 200: if response != 200: