1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
}
}
}