1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Backport 1.23 (#32868)

Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
wxiaoguang
2024-12-17 11:58:27 +08:00
committed by GitHub
parent 22c4599542
commit e98dd6ee5b
16 changed files with 208 additions and 7 deletions

View File

@@ -12,6 +12,9 @@ import (
"code.gitea.io/gitea/modules/setting"
)
// CanUserForkBetweenOwners returns true if user can fork between owners.
// By default, a user can fork a repository from another owner, but not from themselves.
// Many users really like to fork their own repositories, so add an experimental setting to allow this.
func CanUserForkBetweenOwners(id1, id2 int64) bool {
if id1 != id2 {
return true