chore: initialize Gitea v1.27.2 fork
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
cache-seeder / gobuild (push) Canceled after 0s
cache-seeder / lint (bindata, lint-backend) (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s

Includes direct password setup links in registration emails.

Assisted-by: Codex:GPT-5
This commit is contained in:
2026-08-15 22:56:18 +08:00
commit e4afba3416
6210 changed files with 802505 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
// Copyright 2016 The Gogs Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
// RepoWritePermission is a permission level callers may grant to a team or
// collaborator on input. Output fields use AccessLevelName instead.
// swagger:enum RepoWritePermission
type RepoWritePermission string
const (
RepoWritePermissionRead RepoWritePermission = "read"
RepoWritePermissionWrite RepoWritePermission = "write"
RepoWritePermissionAdmin RepoWritePermission = "admin"
)
// AccessLevelName is the string rendering of a perm.AccessMode produced on
// API responses. Callers must not send these values; use RepoWritePermission
// on input.
// swagger:enum AccessLevelName
type AccessLevelName string
const (
AccessLevelNameNone AccessLevelName = "none"
AccessLevelNameRead AccessLevelName = "read"
AccessLevelNameWrite AccessLevelName = "write"
AccessLevelNameAdmin AccessLevelName = "admin"
AccessLevelNameOwner AccessLevelName = "owner"
)
// AddCollaboratorOption options when adding a user as a collaborator of a repository
type AddCollaboratorOption struct {
// Permission level to grant the collaborator
Permission *RepoWritePermission `json:"permission"`
}
// RepoCollaboratorPermission to get repository permission for a collaborator
type RepoCollaboratorPermission struct {
// Permission level of the collaborator
Permission AccessLevelName `json:"permission"`
// RoleName is the name of the permission role
RoleName string `json:"role_name"`
// User information of the collaborator
User *User `json:"user"`
}