mirror of
https://github.com/hanzoai/forge.git
synced 2026-10-30 15:00:39 +00:00
Finishes the residual pass: the bulk of served leaks remained (28 locale files, most templates, all raster/source assets, Chinese READMEs). Imports, identifiers, and wire contracts are left intact. - locale: 28 files, all "Gitea" -> "Hanzo Git"; docs/blog/about.gitea.* + gitea.com/.io + go-gitea help URLs -> docs.hanzo.ai / git.hanzo.ai / github.com/hanzoai/git (keys with lowercase "gitea" preserved) - templates: footer, swagger UI title + generated OpenAPI specs (stale gitea.dev x-go-package -> github.com/hanzoai/git), webhook usernames, OAuth-source labels, package/help doc links, example org/team identifiers - Go served defaults: RSS feed author/description, git commit user.name + fallback email, WWW-Authenticate realms (OAuth2/packages/container), 500/error pages, MS Teams card, built-in OAuth provider label, CLI --help, SSH + push-rejection messages, startup/index/redis/doctor logs, test-mail subject + X-Mailer - config: app.example.ini APP_NAME default - assets: source assets/*.svg, gitea.svg, gitea-gitea sprite, and all PNGs (logo/favicon/apple-touch/avatar_default) regenerated as the committed black-tile Hanzo mark; --color-logo #609926 -> monochrome; favicon-status test realigned to the new mark (viewBox 64) - README.zh-tw + README.zh-cn rewritten as Hanzo Git - render field CommitParticipant.GiteaUser -> User Preserved (imports / identifiers / external contracts): code.gitea.io, module github.com/hanzoai/git, gitea.dev/sdk dep, X-Gitea-* webhook + email headers, WWW-Authenticate realm="Gitea" in git-HTTP (Git Credential Manager OAuth2 detection), GitServiceType "Gitea" migration-source name, theme id gitea-auto, .gitea-* classes / svg symbol ids, Go/JS identifiers, "The Gitea Authors" copyright headers, outbound User-Agent headers. Co-authored-by: Hanzo Dev <[email protected]>
151 lines
5.5 KiB
Handlebars
151 lines
5.5 KiB
Handlebars
{{template "admin/layout_head" (dict "pageClass" "admin new authentication")}}
|
|
<div class="admin-setting-content">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "admin.auths.new"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
{{template "base/disable_form_autofill"}}
|
|
<!-- Types and name -->
|
|
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
|
<label>{{ctx.Locale.Tr "admin.auths.auth_type"}}</label>
|
|
<div class="ui selection type dropdown">
|
|
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
|
<div class="text">{{.CurrentTypeName}}</div>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
<div class="menu">
|
|
{{range .AuthSources}}
|
|
<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
|
<label for="auth_name">{{ctx.Locale.Tr "admin.auths.auth_name"}}</label>
|
|
<input id="auth_name" name="name" value="{{.name}}" autofocus required>
|
|
</div>
|
|
|
|
<!-- LDAP and DLDAP -->
|
|
{{template "admin/auth/source/ldap" .}}
|
|
|
|
<!-- SMTP -->
|
|
{{template "admin/auth/source/smtp" .}}
|
|
|
|
<!-- PAM -->
|
|
<div class="pam required field {{if not (eq .type 4)}}tw-hidden{{end}}">
|
|
<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
|
|
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}">
|
|
<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
|
|
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
|
|
</div>
|
|
<div class="pam optional field {{if not (eq .type 4)}}tw-hidden{{end}}">
|
|
<div class="ui checkbox">
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- OAuth2 -->
|
|
{{template "admin/auth/source/oauth" .}}
|
|
|
|
<!-- SSPI -->
|
|
{{template "admin/auth/source/sspi" .}}
|
|
|
|
<div class="ldap field">
|
|
<div class="ui checkbox">
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label>
|
|
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
|
|
</div>
|
|
</div>
|
|
<div class="oauth2 ldap inline field {{if not (or (eq .type 2) (eq .type 6))}}tw-hidden{{end}}">
|
|
<div class="ui checkbox">
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
|
|
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
|
|
</div>
|
|
</div>
|
|
<div class="inline field">
|
|
<div class="ui checkbox">
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.activated"}}</strong></label>
|
|
<input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<button class="ui primary button">{{ctx.Locale.Tr "admin.auths.new"}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "admin.auths.tips"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<h5>GMail Settings:</h5>
|
|
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
|
|
|
|
<div class="oauth2">
|
|
<h5>{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}</h5>
|
|
<p>{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p>
|
|
</div>
|
|
<div class="oauth2 tw-mt-4">
|
|
<h5>{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}</h5>
|
|
<ul>
|
|
<li>
|
|
Bitbucket
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.bitbucket" "https://bitbucket.org/account/user/{your-username}/oauth-consumers/new"}}</div>
|
|
</li>
|
|
<li>
|
|
Dropbox
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.dropbox" "https://www.dropbox.com/developers/apps"}}</div>
|
|
</li>
|
|
<li>
|
|
Facebook
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.facebook" "https://developers.facebook.com/apps"}}</div>
|
|
</li>
|
|
<li>
|
|
GitHub
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.github" "https://github.com/settings/applications/new"}}</div>
|
|
</li>
|
|
<li>
|
|
GitLab
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.gitlab_new" "https://gitlab.com/-/profile/applications"}}</div>
|
|
</li>
|
|
<li>
|
|
Google
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.google_plus" "https://console.developers.google.com/"}}</div>
|
|
</li>
|
|
<li>
|
|
OpenID Connect
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}</div>
|
|
</li>
|
|
<li>
|
|
Twitter
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.twitter" "https://dev.twitter.com/apps"}}</div>
|
|
</li>
|
|
<li>
|
|
Discord
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.discord" "https://discordapp.com/developers/applications/me"}}</div>
|
|
</li>
|
|
<li>
|
|
Hanzo Git
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.gitea" "https://docs.hanzo.ai/development/oauth2-provider"}}</div>
|
|
</li>
|
|
<li>
|
|
Nextcloud
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}</div>
|
|
</li>
|
|
<li>
|
|
Yandex
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.yandex" "https://oauth.yandex.com/client/new"}}</div>
|
|
</li>
|
|
<li>
|
|
Mastodon
|
|
<div>{{ctx.Locale.Tr "admin.auths.tip.mastodon"}}</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "admin/layout_footer" .}}
|