backport #6674 - API OTP Context (#6676)

This commit is contained in:
techknowlogick 2019-04-19 08:18:10 -04:00 committed by Lunny Xiao
parent 0acaa6bd00
commit ba12463175
4 changed files with 56 additions and 4 deletions

View file

@ -214,9 +214,10 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
}
return nil, false
}
} else {
ctx.Data["IsApiToken"] = true
}
ctx.Data["IsApiToken"] = true
return u, true
}
}