File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,10 @@ func signInOpenIDVerify(ctx *context.Context) {
250
250
251
251
// ConnectOpenID shows a form to connect an OpenID URI to an existing account
252
252
func ConnectOpenID (ctx * context.Context ) {
253
+ if ! setting .Service .EnableOpenIDSignIn {
254
+ ctx .Error (403 )
255
+ return
256
+ }
253
257
oid , _ := ctx .Session .Get ("openid_verified_uri" ).(string )
254
258
if oid == "" {
255
259
ctx .Redirect (setting .AppSubURL + "/user/login/openid" )
Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ const (
20
20
21
21
// SettingsOpenID renders change user's openid page
22
22
func SettingsOpenID (ctx * context.Context ) {
23
+
24
+ if ! setting .Service .EnableOpenIDSignIn {
25
+ ctx .Error (403 )
26
+ return
27
+ }
28
+
23
29
ctx .Data ["Title" ] = ctx .Tr ("settings" )
24
30
ctx .Data ["PageIsSettingsOpenID" ] = true
25
31
@@ -41,7 +47,7 @@ func SettingsOpenID(ctx *context.Context) {
41
47
// SettingsOpenIDPost response for change user's openid
42
48
func SettingsOpenIDPost (ctx * context.Context , form auth.AddOpenIDForm ) {
43
49
44
- if ! setting .Service .EnableOpenIDSignUp {
50
+ if ! setting .Service .EnableOpenIDSignIn {
45
51
ctx .Error (403 )
46
52
return
47
53
}
@@ -138,7 +144,7 @@ func settingsOpenIDVerify(ctx *context.Context) {
138
144
139
145
// DeleteOpenID response for delete user's openid
140
146
func DeleteOpenID (ctx * context.Context ) {
141
- if ! setting .Service .EnableOpenIDSignUp {
147
+ if ! setting .Service .EnableOpenIDSignIn {
142
148
ctx .Error (403 )
143
149
return
144
150
}
@@ -156,7 +162,7 @@ func DeleteOpenID(ctx *context.Context) {
156
162
157
163
// ToggleOpenIDVisibility response for toggle visibility of user's openid
158
164
func ToggleOpenIDVisibility (ctx * context.Context ) {
159
- if ! setting .Service .EnableOpenIDSignUp {
165
+ if ! setting .Service .EnableOpenIDSignIn {
160
166
ctx .Error (403 )
161
167
return
162
168
}
You can’t perform that action at this time.
0 commit comments