Commit c99f0d0e authored by Martin Lehoux's avatar Martin Lehoux

Merge branch 'limited-auth' into 'master'

add limited auth

See merge request ViaRezo/nofist-v2!29
parents 79d7045a 145fc0d3
......@@ -4,7 +4,8 @@ import requests
def find_or_create_user(access_token, access_token_payload):
data = access_token_payload['user']
if data['personType'] not in ['STUDENT_SUPELEC', 'STUDENT_CENTRALE', 'STUDENT_CENTRALESUPELEC']:
raise Exception('Permission denied')
try:
user = User.objects.get(username=data['login'])
except User.DoesNotExist:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment