Fix: option name from allow_logout to allow_disconnect
This commit is contained in:
parent
fe7ff38bd8
commit
724ab34006
|
@ -1066,7 +1066,7 @@ func viewSettings(app *App, u *User, w http.ResponseWriter, r *http.Request) err
|
||||||
enableOauthGitLab = false
|
enableOauthGitLab = false
|
||||||
case "generic":
|
case "generic":
|
||||||
oauthAccounts[idx].DisplayName = app.Config().GenericOauth.DisplayName
|
oauthAccounts[idx].DisplayName = app.Config().GenericOauth.DisplayName
|
||||||
oauthAccounts[idx].AllowLogout = app.Config().GenericOauth.AllowLogout
|
oauthAccounts[idx].AllowDisconnect = app.Config().GenericOauth.AllowDisconnect
|
||||||
enableOauthGeneric = false
|
enableOauthGeneric = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ type (
|
||||||
TokenEndpoint string `ini:"token_endpoint"`
|
TokenEndpoint string `ini:"token_endpoint"`
|
||||||
InspectEndpoint string `ini:"inspect_endpoint"`
|
InspectEndpoint string `ini:"inspect_endpoint"`
|
||||||
AuthEndpoint string `ini:"auth_endpoint"`
|
AuthEndpoint string `ini:"auth_endpoint"`
|
||||||
AllowLogout bool `ini:"allow_logout"`
|
AllowDisconnect bool `ini:"allow_disconnect"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppCfg holds values that affect how the application functions
|
// AppCfg holds values that affect how the application functions
|
||||||
|
|
10
database.go
10
database.go
|
@ -2588,11 +2588,11 @@ func (db *datastore) GetIDForRemoteUser(ctx context.Context, remoteUserID, provi
|
||||||
}
|
}
|
||||||
|
|
||||||
type oauthAccountInfo struct {
|
type oauthAccountInfo struct {
|
||||||
Provider string
|
Provider string
|
||||||
ClientID string
|
ClientID string
|
||||||
RemoteUserID string
|
RemoteUserID string
|
||||||
DisplayName string
|
DisplayName string
|
||||||
AllowLogout bool
|
AllowDisconnect bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *datastore) GetOauthAccounts(ctx context.Context, userID int64) ([]oauthAccountInfo, error) {
|
func (db *datastore) GetOauthAccounts(ctx context.Context, userID int64) ([]oauthAccountInfo, error) {
|
||||||
|
|
|
@ -87,7 +87,7 @@ h3 { font-weight: normal; }
|
||||||
<input type="hidden" name="remote_user_id" value="{{ $oauth_account.RemoteUserID }}" />
|
<input type="hidden" name="remote_user_id" value="{{ $oauth_account.RemoteUserID }}" />
|
||||||
<div class="section oauth-provider">
|
<div class="section oauth-provider">
|
||||||
{{ if $oauth_account.DisplayName}}
|
{{ if $oauth_account.DisplayName}}
|
||||||
{{ if $oauth_account.AllowLogout}}
|
{{ if $oauth_account.AllowDisconnect}}
|
||||||
<input type="submit" value="Remove {{.DisplayName}}" />
|
<input type="submit" value="Remove {{.DisplayName}}" />
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="btn cta"><strong>{{.DisplayName}}</strong></a>
|
<a class="btn cta"><strong>{{.DisplayName}}</strong></a>
|
||||||
|
|
Loading…
Reference in New Issue