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

Merge branch 'haow/dev' into 'test'

sun user add roles

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