Integrate OAuth2 Provider (#5378)

This commit is contained in:
Jonas Franz 2019-03-08 17:42:50 +01:00 committed by techknowlogick
parent 9d3732dfd5
commit e777c6bdc6
37 changed files with 2667 additions and 11 deletions

View file

@ -74,4 +74,12 @@ func loadApplicationsData(ctx *context.Context) {
return
}
ctx.Data["Tokens"] = tokens
ctx.Data["EnableOAuth2"] = setting.OAuth2.Enable
if setting.OAuth2.Enable {
ctx.Data["Applications"], err = models.GetOAuth2ApplicationsByUserID(ctx.User.ID)
if err != nil {
ctx.ServerError("GetOAuth2ApplicationsByUserID", err)
return
}
}
}