mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. Introduces some new functions for creating setting.Cfg.
This commit is contained in:
committed by
GitHub
parent
147bf01745
commit
6768c6c059
@@ -122,16 +122,14 @@ func TestLoginErrorCookieAPIEndpoint(t *testing.T) {
|
||||
})
|
||||
|
||||
cfg.LoginCookieName = loginCookieName
|
||||
setting.SecretKey = "login_testing"
|
||||
|
||||
cfg.OAuthAutoLogin = true
|
||||
|
||||
oauthError := errors.New("User not a member of one of the required organizations")
|
||||
encryptedError, err := hs.SecretsService.Encrypt(context.Background(), []byte(oauthError.Error()), secrets.WithoutScope())
|
||||
require.NoError(t, err)
|
||||
expCookiePath := "/"
|
||||
if len(setting.AppSubUrl) > 0 {
|
||||
expCookiePath = setting.AppSubUrl
|
||||
if len(cfg.AppSubURL) > 0 {
|
||||
expCookiePath = cfg.AppSubURL
|
||||
}
|
||||
cookie := http.Cookie{
|
||||
Name: loginErrorCookieName,
|
||||
|
||||
Reference in New Issue
Block a user