summaryrefslogtreecommitdiffstats
path: root/routers/user/setting/applications.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/setting/applications.go')
-rw-r--r--routers/user/setting/applications.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/user/setting/applications.go b/routers/user/setting/applications.go
index ac7252469a..bc8633f72d 100644
--- a/routers/user/setting/applications.go
+++ b/routers/user/setting/applications.go
@@ -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
+ }
+ }
}