mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-20 11:43:40 +09:00
Adds first-class bot accounts (`UserTypeBot`): local, password-less
users for automation that authenticate only with access tokens.
1. Admin UI: create bots, filter users by type, manage a bot's access
tokens, convert between user and bot
2. API: `POST /admin/users/{username}/convert-type`, and user objects
gain a GitHub-compatible `type` (`User`, `Organization`, `Bot`)
3. CLI: `gitea admin user change-type`, `--user-type` accepts `User` or
`Bot` case-insensitively
4. Converting keeps the password, 2FA, OAuth2 grants and access tokens,
and since sign-in rejects bots, converting back restores the account.
Only local, non-admin accounts can be converted, and conversions are
audited
5. Session, reverse proxy, SSPI, external source and password reset
sign-in reject non-individual users, so a bot never gets an interactive
session
6. Bots receive no notifications or emails
Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: joestump <joe@joestump.net>
Co-authored-by: Joe Stump <joe@stu.mp>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
52 lines
1.7 KiB
Handlebars
52 lines
1.7 KiB
Handlebars
{{template "user/settings/layout_head" (dict "pageClass" "user settings organization")}}
|
|
<div class="user-setting-content">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "settings.orgs"}}
|
|
{{if .SignedUser.CanCreateOrganization}}
|
|
<div class="ui right">
|
|
<a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{ctx.Locale.Tr "admin.orgs.new_orga"}}</a>
|
|
</div>
|
|
{{end}}
|
|
</h4>
|
|
<div class="ui attached segment orgs">
|
|
{{if .Orgs}}
|
|
<div class="flex-divided-list items-with-main">
|
|
{{range .Orgs}}
|
|
<div class="item">
|
|
<div class="item-leading">
|
|
{{ctx.AvatarUtils.Avatar . 28 "mini"}}
|
|
</div>
|
|
<div class="item-main">
|
|
<div class="item-title">{{template "shared/user/name" .AsUser}}</div>
|
|
<div class="flex-text-body">
|
|
{{.Description}}
|
|
</div>
|
|
</div>
|
|
<div class="item-trailing">
|
|
<button type="button" class="ui red button show-modal" data-modal="#leave-organization"
|
|
data-modal-form.url="{{.OrganisationLink}}/members/action/leave?uid={{$.SignedUser.ID}}"
|
|
data-modal-organization-name="{{.DisplayName}}">{{ctx.Locale.Tr "org.members.leave"}}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{template "base/paginate" .}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "settings.orgs_none"}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
|
|
<form class="ui small modal form-fetch-action" method="post" id="leave-organization">
|
|
<div class="header">
|
|
{{ctx.Locale.Tr "org.members.leave"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{ctx.Locale.Tr "org.members.leave.detail" (HTMLFormat `<span class="%s"></span>` "organization-name")}}</p>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</form>
|
|
|
|
{{template "user/settings/layout_footer" .}}
|