Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
sun
Commits
1fe21a2b
Commit
1fe21a2b
authored
Apr 26, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
sun user add roles See merge request
alpha/sun!183
parents
58a42726
34f24c51
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
account.py
api/account.py
+3
-0
No files found.
api/account.py
View file @
1fe21a2b
...
@@ -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'
]})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment