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
34f24c51
Commit
34f24c51
authored
5 years ago
by
haowang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sun user add roles
parent
ba6c9ea1
master
deploy/like-prod
deploy/like-stage
deploy/like-test
dev
like-pre/r01
test
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
account.py
api/account.py
+4
-1
No files found.
api/account.py
View file @
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
{
...
...
This diff is collapsed.
Click to expand it.
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