From 724ab34006b7c9c3bd375ba33d81f81f67a90de2 Mon Sep 17 00:00:00 2001 From: prichier Date: Sat, 6 Jun 2020 23:52:26 +0200 Subject: [PATCH] Fix: option name from allow_logout to allow_disconnect --- account.go | 2 +- config/config.go | 2 +- database.go | 10 +++++----- templates/user/settings.tmpl | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/account.go b/account.go index e2949c0..4dc8ef9 100644 --- a/account.go +++ b/account.go @@ -1066,7 +1066,7 @@ func viewSettings(app *App, u *User, w http.ResponseWriter, r *http.Request) err enableOauthGitLab = false case "generic": oauthAccounts[idx].DisplayName = app.Config().GenericOauth.DisplayName - oauthAccounts[idx].AllowLogout = app.Config().GenericOauth.AllowLogout + oauthAccounts[idx].AllowDisconnect = app.Config().GenericOauth.AllowDisconnect enableOauthGeneric = false } } diff --git a/config/config.go b/config/config.go index f2589ea..ffd171a 100644 --- a/config/config.go +++ b/config/config.go @@ -96,7 +96,7 @@ type ( TokenEndpoint string `ini:"token_endpoint"` InspectEndpoint string `ini:"inspect_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 diff --git a/database.go b/database.go index a98be71..1e02010 100644 --- a/database.go +++ b/database.go @@ -2588,11 +2588,11 @@ func (db *datastore) GetIDForRemoteUser(ctx context.Context, remoteUserID, provi } type oauthAccountInfo struct { - Provider string - ClientID string - RemoteUserID string - DisplayName string - AllowLogout bool + Provider string + ClientID string + RemoteUserID string + DisplayName string + AllowDisconnect bool } func (db *datastore) GetOauthAccounts(ctx context.Context, userID int64) ([]oauthAccountInfo, error) { diff --git a/templates/user/settings.tmpl b/templates/user/settings.tmpl index ef9bacb..dbffe4d 100644 --- a/templates/user/settings.tmpl +++ b/templates/user/settings.tmpl @@ -87,7 +87,7 @@ h3 { font-weight: normal; }
{{ if $oauth_account.DisplayName}} - {{ if $oauth_account.AllowLogout}} + {{ if $oauth_account.AllowDisconnect}} {{else}} {{.DisplayName}}