This commit is contained in:
parent
387a4b09c1
commit
e47df0b301
17 changed files with 131 additions and 89 deletions
|
@ -175,7 +175,7 @@ func repoAssignment() macaron.Handler {
|
|||
// Contexter middleware already checks token for user sign in process.
|
||||
func reqToken() macaron.Handler {
|
||||
return func(ctx *context.Context) {
|
||||
if !ctx.IsSigned {
|
||||
if true != ctx.Data["IsApiToken"] {
|
||||
ctx.Error(401)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue