Skip to content

Commit f59b171

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: fix pam authorization (go-gitea#19040) [skip ci] Updated translations via Crowdin Upgrading binding package (go-gitea#19034) Ensure isSSH is set whenever DISABLE_HTTP_GIT is set (go-gitea#19028)
2 parents a15b0f1 + 1314f38 commit f59b171

File tree

6 files changed

+29
-16
lines changed

6 files changed

+29
-16
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.16
55
require (
66
code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b
77
code.gitea.io/sdk/gitea v0.15.1
8-
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be
8+
gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb
99
gitea.com/go-chi/cache v0.0.0-20211201020628-dcb774c4ffea
1010
gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5
1111
gitea.com/go-chi/session v0.0.0-20211218221615-e3605d8b28b8
@@ -48,7 +48,6 @@ require (
4848
github.com/go-swagger/go-swagger v0.29.0
4949
github.com/go-testfixtures/testfixtures/v3 v3.6.1
5050
github.com/gobwas/glob v0.2.3
51-
github.com/goccy/go-json v0.9.5 // indirect
5251
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
5352
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
5453
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ contrib.go.opencensus.io/exporter/stackdriver v0.13.5/go.mod h1:aXENhDJ1Y4lIg4EU
6969
contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE=
7070
contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA=
7171
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
72-
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be h1:IzSwPVzd2hE6e67ujY8ReBCrQ5IFNd0uiBmC7Ux5IaY=
73-
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be/go.mod h1:/vR0YjlusOYvosKYW7QKcSnrY0nPLe4RQ/DGi3+i/Do=
72+
gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb h1:Yy0Bxzc8R2wxiwXoG/rECGplJUSpXqCsog9PuJFgiHs=
73+
gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb/go.mod h1:77TZu701zMXWJFvB8gvTbQ92zQ3DQq/H7l5wAEjQRKc=
7474
gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=
7575
gitea.com/go-chi/cache v0.0.0-20211201020628-dcb774c4ffea h1:Fq/f4hjigb5v5WpA5TfBCZOSavpHPBiB4Wkj/WsITYM=
7676
gitea.com/go-chi/cache v0.0.0-20211201020628-dcb774c4ffea/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=

modules/auth/pam/pam.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ func Auth(serviceName, userName, passwd string) (string, error) {
3434
if err = t.Authenticate(0); err != nil {
3535
return "", err
3636
}
37+
38+
if err = t.AcctMgmt(0); err != nil {
39+
return "", err
40+
}
3741

3842
// PAM login names might suffer transformations in the PAM stack.
3943
// We should take whatever the PAM stack returns for it.

options/locale/locale_ja-JP.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,7 @@ projects.board.deletion_desc=プロジェクトボードを削除すると、関
11811181
projects.board.color=色
11821182
projects.open=オープン
11831183
projects.close=クローズ
1184+
projects.board.assigned_to=担当
11841185

11851186
issues.desc=バグ報告、タスク、マイルストーンの作成。
11861187
issues.filter_assignees=候補者の絞り込み
@@ -1786,6 +1787,7 @@ settings.pulls.allow_rebase_merge_commit=マージコミット(--no-ff)を伴う
17861787
settings.pulls.allow_squash_commits=スカッシュによるコミットのマージを有効にする
17871788
settings.pulls.allow_manual_merge=プルリクエストを手動マージ済みにマークすることを可能にする
17881789
settings.pulls.enable_autodetect_manual_merge=手動マージの自動検出を有効にする (注意: 特殊なケースでは判定ミスが発生する場合があります)
1790+
settings.pulls.allow_rebase_update=リベースでプルリクエストのブランチの更新を可能にする
17891791
settings.pulls.default_delete_branch_after_merge=デフォルトでプルリクエストのブランチをマージ後に削除する
17901792
settings.projects_desc=リポジトリプロジェクトを有効にする
17911793
settings.admin_settings=管理者用設定

options/locale/locale_pt-PT.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,7 @@ projects.board.deletion_desc=Eliminar um painel de projecto faz com que todas as
11801180
projects.board.color=Cor
11811181
projects.open=Abrir
11821182
projects.close=Fechar
1183+
projects.board.assigned_to=Atribuído a
11831184

11841185
issues.desc=Organize relatórios de erros, tarefas e etapas.
11851186
issues.filter_assignees=Filtrar responsável

templates/repo/clone_buttons.tmpl

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,24 @@
1919
</button>
2020
{{end}}
2121
{{if not (and $.DisableHTTP $.DisableSSH)}}
22-
<script defer>
23-
const isSSH = localStorage.getItem('repo-clone-protocol') === 'ssh';
24-
const sshButton = document.getElementById('repo-clone-ssh');
25-
const httpsButton = document.getElementById('repo-clone-https');
26-
const input = document.getElementById('repo-clone-url');
27-
if (input) input.value = (isSSH ? sshButton : httpsButton).getAttribute('data-link');
28-
if (sshButton) sshButton.classList[isSSH ? 'add' : 'remove']('primary');
29-
if (httpsButton) httpsButton.classList[isSSH ? 'remove' : 'add']('primary');
30-
setTimeout(() => {
31-
if (sshButton) sshButton.classList.remove('no-transition');
32-
if (httpsButton) httpsButton.classList.remove('no-transition');
33-
}, 100);
22+
<script>
23+
<!-- /* eslint-disable */ -->
24+
window.config.pageData['repoCloneButtons']= {httpsDisabled: {{$.DisableHTTP}}};
25+
</script>
26+
<script>
27+
(() => {
28+
const tmplData = window.config.pageData.repoCloneButtons;
29+
const isSSH = tmplData.httpsDisabled || localStorage.getItem('repo-clone-protocol') === 'ssh';
30+
const sshButton = document.getElementById('repo-clone-ssh');
31+
const httpsButton = document.getElementById('repo-clone-https');
32+
const input = document.getElementById('repo-clone-url');
33+
if (input) input.value = (isSSH ? sshButton : httpsButton).getAttribute('data-link');
34+
if (sshButton) sshButton.classList[isSSH ? 'add' : 'remove']('primary');
35+
if (httpsButton) httpsButton.classList[isSSH ? 'remove' : 'add']('primary');
36+
setTimeout(() => {
37+
if (sshButton) sshButton.classList.remove('no-transition');
38+
if (httpsButton) httpsButton.classList.remove('no-transition');
39+
}, 100);
40+
})();
3441
</script>
3542
{{end}}

0 commit comments

Comments
 (0)