mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 08:06:52 +02:00
avoid c.Next() and c.Abort() both being executed
This commit is contained in:
parent
9264105414
commit
1dbf782356
@ -65,9 +65,9 @@ func MustTeamAdmin() gin.HandlerFunc {
|
||||
|
||||
if perm.Admin {
|
||||
c.Next()
|
||||
} else {
|
||||
c.String(401, "User not authorized")
|
||||
c.Abort()
|
||||
}
|
||||
|
||||
c.String(401, "User not authorized")
|
||||
c.Abort()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user