We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3f4458 commit efecbbaCopy full SHA for efecbba
routers/web/user/setting/oauth2_common.go
@@ -27,9 +27,8 @@ func (oa *OAuth2CommonHandlers) renderEditPage(ctx *context.Context) {
27
app := ctx.Data["App"].(*auth.OAuth2Application)
28
ctx.Data["FormActionPath"] = fmt.Sprintf("%s/%d", oa.BasePathEditPrefix, app.ID)
29
30
- if ctx.ContextUser.IsOrganization() {
31
- err := shared_user.LoadHeaderCount(ctx)
32
- if err != nil {
+ if ctx.ContextUser != nil && ctx.ContextUser.IsOrganization() {
+ if err := shared_user.LoadHeaderCount(ctx); err != nil {
33
ctx.ServerError("LoadHeaderCount", err)
34
return
35
}
@@ -68,6 +67,7 @@ func (oa *OAuth2CommonHandlers) AddApp(ctx *context.Context) {
68
67
ctx.ServerError("GenerateClientSecret", err)
69
70
+
71
oa.renderEditPage(ctx)
72
73
0 commit comments