Commit 24552ea0 authored by haowang's avatar haowang

add roles in login get method

parent 34f24c51
......@@ -75,6 +75,9 @@ class LoginView(APIView):
'avatar': settings.AVATAR
})
if data['is_staff']:
if data.get('staff_level'):
data.update({'roles': ['mbhoperator']})
else:
data.update({'roles': ['staff']})
else:
data.update({'roles': ['anonymous']})
......
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