Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaofficial/main'
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
zjjhot committed Mar 10, 2022
2 parents a15b0f1 + 1314f38 commit f59b171
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 16 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
code.gitea.io/gitea-vet v0.2.2-0.20220122151748-48ebc902541b
code.gitea.io/sdk/gitea v0.15.1
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be
gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb
gitea.com/go-chi/cache v0.0.0-20211201020628-dcb774c4ffea
gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5
gitea.com/go-chi/session v0.0.0-20211218221615-e3605d8b28b8
Expand Down Expand Up @@ -48,7 +48,6 @@ require (
github.com/go-swagger/go-swagger v0.29.0
github.com/go-testfixtures/testfixtures/v3 v3.6.1
github.com/gobwas/glob v0.2.3
github.com/goccy/go-json v0.9.5 // indirect
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ contrib.go.opencensus.io/exporter/stackdriver v0.13.5/go.mod h1:aXENhDJ1Y4lIg4EU
contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE=
contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be h1:IzSwPVzd2hE6e67ujY8ReBCrQ5IFNd0uiBmC7Ux5IaY=
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be/go.mod h1:/vR0YjlusOYvosKYW7QKcSnrY0nPLe4RQ/DGi3+i/Do=
gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb h1:Yy0Bxzc8R2wxiwXoG/rECGplJUSpXqCsog9PuJFgiHs=
gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb/go.mod h1:77TZu701zMXWJFvB8gvTbQ92zQ3DQq/H7l5wAEjQRKc=
gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=
gitea.com/go-chi/cache v0.0.0-20211201020628-dcb774c4ffea h1:Fq/f4hjigb5v5WpA5TfBCZOSavpHPBiB4Wkj/WsITYM=
gitea.com/go-chi/cache v0.0.0-20211201020628-dcb774c4ffea/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=
Expand Down
4 changes: 4 additions & 0 deletions modules/auth/pam/pam.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func Auth(serviceName, userName, passwd string) (string, error) {
if err = t.Authenticate(0); err != nil {
return "", err
}

if err = t.AcctMgmt(0); err != nil {
return "", err
}

// PAM login names might suffer transformations in the PAM stack.
// We should take whatever the PAM stack returns for it.
Expand Down
2 changes: 2 additions & 0 deletions options/locale/locale_ja-JP.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,7 @@ projects.board.deletion_desc=プロジェクトボードを削除すると、関
projects.board.color=色
projects.open=オープン
projects.close=クローズ
projects.board.assigned_to=担当

issues.desc=バグ報告、タスク、マイルストーンの作成。
issues.filter_assignees=候補者の絞り込み
Expand Down Expand Up @@ -1786,6 +1787,7 @@ settings.pulls.allow_rebase_merge_commit=マージコミット(--no-ff)を伴う
settings.pulls.allow_squash_commits=スカッシュによるコミットのマージを有効にする
settings.pulls.allow_manual_merge=プルリクエストを手動マージ済みにマークすることを可能にする
settings.pulls.enable_autodetect_manual_merge=手動マージの自動検出を有効にする (注意: 特殊なケースでは判定ミスが発生する場合があります)
settings.pulls.allow_rebase_update=リベースでプルリクエストのブランチの更新を可能にする
settings.pulls.default_delete_branch_after_merge=デフォルトでプルリクエストのブランチをマージ後に削除する
settings.projects_desc=リポジトリプロジェクトを有効にする
settings.admin_settings=管理者用設定
Expand Down
1 change: 1 addition & 0 deletions options/locale/locale_pt-PT.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ projects.board.deletion_desc=Eliminar um painel de projecto faz com que todas as
projects.board.color=Cor
projects.open=Abrir
projects.close=Fechar
projects.board.assigned_to=Atribuído a

issues.desc=Organize relatórios de erros, tarefas e etapas.
issues.filter_assignees=Filtrar responsável
Expand Down
31 changes: 19 additions & 12 deletions templates/repo/clone_buttons.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,24 @@
</button>
{{end}}
{{if not (and $.DisableHTTP $.DisableSSH)}}
<script defer>
const isSSH = localStorage.getItem('repo-clone-protocol') === 'ssh';
const sshButton = document.getElementById('repo-clone-ssh');
const httpsButton = document.getElementById('repo-clone-https');
const input = document.getElementById('repo-clone-url');
if (input) input.value = (isSSH ? sshButton : httpsButton).getAttribute('data-link');
if (sshButton) sshButton.classList[isSSH ? 'add' : 'remove']('primary');
if (httpsButton) httpsButton.classList[isSSH ? 'remove' : 'add']('primary');
setTimeout(() => {
if (sshButton) sshButton.classList.remove('no-transition');
if (httpsButton) httpsButton.classList.remove('no-transition');
}, 100);
<script>
<!-- /* eslint-disable */ -->
window.config.pageData['repoCloneButtons']= {httpsDisabled: {{$.DisableHTTP}}};
</script>
<script>
(() => {
const tmplData = window.config.pageData.repoCloneButtons;
const isSSH = tmplData.httpsDisabled || localStorage.getItem('repo-clone-protocol') === 'ssh';
const sshButton = document.getElementById('repo-clone-ssh');
const httpsButton = document.getElementById('repo-clone-https');
const input = document.getElementById('repo-clone-url');
if (input) input.value = (isSSH ? sshButton : httpsButton).getAttribute('data-link');
if (sshButton) sshButton.classList[isSSH ? 'add' : 'remove']('primary');
if (httpsButton) httpsButton.classList[isSSH ? 'remove' : 'add']('primary');
setTimeout(() => {
if (sshButton) sshButton.classList.remove('no-transition');
if (httpsButton) httpsButton.classList.remove('no-transition');
}, 100);
})();
</script>
{{end}}

0 comments on commit f59b171

Please sign in to comment.