This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
wangwei
/
aiforge
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
128
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
API: Fix null pointer in attempt to Sudo if not logged in (
#5872
)
Signed-off-by: Andrew Thornton <art27@cantab.net>
tags/v1.9.0-dev
zeripath
GitHub
6 years ago
parent
6891d0d3f5
commit
02f867addc
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
routers/api/v1/api.go
+ 1
- 1
routers/api/v1/api.go
View File
@@ -85,7 +85,7 @@ func sudo() macaron.Handler {
}
if len(sudo) > 0 {
if ctx.User.IsAdmin {
if ctx.
IsSigned && ctx.
User.IsAdmin {
user, err := models.GetUserByName(sudo)
if err != nil {
if models.IsErrUserNotExist(err) {
Write
Preview
Loading…
Cancel
Save