Commit 1fe21a2b authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

sun user add roles

See merge request alpha/sun!183
parents 58a42726 34f24c51
......@@ -114,7 +114,10 @@ class LoginView(APIView):
error_logger.error(u'登陆失败%s', e)
raise
if data['is_staff']:
ret.update({'roles': ['staff']})
if data.get('staff_level'):
ret.update({'roles': ['mbhoperator']})
else:
ret.update({'roles': ['staff']})
else:
ret.update({'roles': ['anonymous']})
return {
......
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