We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3a334d commit 2979953Copy full SHA for 2979953
routers/api/v1/api.go
@@ -85,7 +85,7 @@ func sudo() macaron.Handler {
85
}
86
87
if len(sudo) > 0 {
88
- if ctx.User.IsAdmin {
+ if ctx.IsSigned && ctx.User.IsAdmin {
89
user, err := models.GetUserByName(sudo)
90
if err != nil {
91
if models.IsErrUserNotExist(err) {
0 commit comments