Skip to content

Commit c4037ed

Browse files
authored
Merge branch 'master' into issue-page_multi-repo-select
2 parents a6a61ce + 54dab5a commit c4037ed

File tree

16 files changed

+150
-48
lines changed

16 files changed

+150
-48
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.13
44

55
require (
66
cloud.google.com/go v0.45.0 // indirect
7+
gitea.com/lunny/levelqueue v0.1.0
78
gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b
89
gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76
910
gitea.com/macaron/captcha v0.0.0-20190822015246-daa973478bae
@@ -59,7 +60,6 @@ require (
5960
github.com/lafriks/xormstore v1.3.2
6061
github.com/lib/pq v1.2.0
6162
github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
62-
github.com/lunny/levelqueue v0.0.0-20190217115915-02b525a4418e
6363
github.com/mailru/easyjson v0.7.0 // indirect
6464
github.com/markbates/goth v1.56.0
6565
github.com/mattn/go-isatty v0.0.7

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ cloud.google.com/go v0.45.0 h1:bALuGBSgE+BD4rxsopAYlqjcwqcQtye6pWG4bC3N/k0=
1010
cloud.google.com/go v0.45.0/go.mod h1:452BcPOeI9AZfbvDw0Tbo7D32wA+WX9WME8AZwMEDZU=
1111
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
1212
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
13+
gitea.com/lunny/levelqueue v0.1.0 h1:7wMk0VH6mvKN6vZEZCy9nUDgRmdPLgeNrm1NkW8EHNk=
14+
gitea.com/lunny/levelqueue v0.1.0/go.mod h1:G7hVb908t0Bl0uk7zGSg14fyzNtxgtD9Shf04wkMK7s=
1315
gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b h1:vXt85uYV17KURaUlhU7v4GbCShkqRZDSfo0TkC0YCjQ=
1416
gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b/go.mod h1:Cxadig6POWpPYYSfg23E7jo35Yf0yvsdC1lifoKWmPo=
1517
gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76 h1:mMsMEg90c5KXQgRWsH8D6GHXfZIW1RAe5S9VYIb12lM=
@@ -361,8 +363,6 @@ github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
361363
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
362364
github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96 h1:uNwtsDp7ci48vBTTxDuwcoTXz4lwtDTe7TjCQ0noaWY=
363365
github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96/go.mod h1:mmIfjCSQlGYXmJ95jFN84AkQFnVABtKuJL8IrzwvUKQ=
364-
github.com/lunny/levelqueue v0.0.0-20190217115915-02b525a4418e h1:GSprKUrG9wNgwQgROvjPGXmcZrg4OLslOuZGB0uJjx8=
365-
github.com/lunny/levelqueue v0.0.0-20190217115915-02b525a4418e/go.mod h1:rQZVENnBOiVakCs97XvclbwJRTAv77CRFWcYVNDkVf8=
366366
github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de h1:nyxwRdWHAVxpFcDThedEgQ07DbcRc5xgNObtbTp76fk=
367367
github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de/go.mod h1:3q8WtuPQsoRbatJuy3nvq/hRSvuBJrHHr+ybPPiNvHQ=
368368
github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af h1:UaWHNBdukWrSG3DRvHFR/hyfg681fceqQDYVTBncKfQ=

modules/indexer/issues/queue_disk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
"code.gitea.io/gitea/modules/log"
1212

13-
"github.com/lunny/levelqueue"
13+
"gitea.com/lunny/levelqueue"
1414
)
1515

1616
var (

routers/admin/admin.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,7 @@ func shadowPassword(provider, cfgItem string) string {
262262
return shadowURL(provider, cfgItem)
263263
// postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full
264264
// Notice: use shadowURL
265-
case "VirtualSession":
266-
var realSession session.Options
267-
if err := json.Unmarshal([]byte(cfgItem), &realSession); err == nil {
268-
return shadowPassword(realSession.Provider, realSession.ProviderConfig)
269-
}
270265
}
271-
272266
return cfgItem
273267
}
274268

@@ -314,8 +308,14 @@ func Config(ctx *context.Context) {
314308
ctx.Data["CacheItemTTL"] = setting.CacheService.TTL
315309

316310
sessionCfg := setting.SessionConfig
311+
if sessionCfg.Provider == "VirtualSession" {
312+
var realSession session.Options
313+
if err := json.Unmarshal([]byte(sessionCfg.ProviderConfig), &realSession); err != nil {
314+
log.Error("Unable to unmarshall session config for virtualed provider config: %s\nError: %v", sessionCfg.ProviderConfig, err)
315+
}
316+
sessionCfg = realSession
317+
}
317318
sessionCfg.ProviderConfig = shadowPassword(sessionCfg.Provider, sessionCfg.ProviderConfig)
318-
319319
ctx.Data["SessionConfig"] = sessionCfg
320320

321321
ctx.Data["DisableGravatar"] = setting.DisableGravatar

templates/admin/config.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
271271
<dd>{{.SessionConfig.Provider}}</dd>
272272
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
273-
<dd><pre>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig | JsonPrettyPrint}}{{else}}-{{end}}</pre></dd>
273+
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
274274
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
275275
<dd>{{.SessionConfig.CookieName}}</dd>
276276
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>

vendor/gitea.com/lunny/levelqueue/.drone.yml

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/lunny/levelqueue/README.md

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/gitea.com/lunny/levelqueue/go.mod

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/lunny/levelqueue/go.sum renamed to vendor/gitea.com/lunny/levelqueue/go.sum

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/lunny/levelqueue/queue.go renamed to vendor/gitea.com/lunny/levelqueue/queue.go

Lines changed: 57 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/lunny/levelqueue/README.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

vendor/github.com/lunny/levelqueue/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# cloud.google.com/go v0.45.0
22
cloud.google.com/go/compute/metadata
3+
# gitea.com/lunny/levelqueue v0.1.0
4+
gitea.com/lunny/levelqueue
35
# gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b
46
gitea.com/macaron/binding
57
# gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76
@@ -277,8 +279,6 @@ github.com/lib/pq/oid
277279
github.com/lib/pq/scram
278280
# github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
279281
github.com/lunny/dingtalk_webhook
280-
# github.com/lunny/levelqueue v0.0.0-20190217115915-02b525a4418e
281-
github.com/lunny/levelqueue
282282
# github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de
283283
github.com/lunny/log
284284
# github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af

0 commit comments

Comments
 (0)