This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
论坛
实训
竞赛
大数据
AI开发
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 panic if anonymous user request admin API
Add sign in check before check user account level
tags/v1.21.12.1
Unknwon
9 years ago
parent
745167d57a
commit
e63b2881b1
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
@@ -103,7 +103,7 @@ func ReqBasicAuth() macaron.Handler {
func ReqAdmin() macaron.Handler {
return func(ctx *context.Context) {
if !ctx.User.IsAdmin {
if !ctx.
IsSigned || !ctx.
User.IsAdmin {
ctx.Error(403)
return
}
Write
Preview
Loading…
Cancel
Save