mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 09:52:26 +02:00
Mirror repository should not allow fork
This commit is contained in:
parent
46dce2d653
commit
119dec51f2
5 changed files with 9 additions and 6 deletions
|
@ -272,6 +272,11 @@ func (repo *Repository) IsOwnedBy(userID int64) bool {
|
|||
return repo.OwnerID == userID
|
||||
}
|
||||
|
||||
// CanBeForked returns true if repository meets the requirements of being forked.
|
||||
func (repo *Repository) CanBeForked() bool {
|
||||
return !repo.IsBare && !repo.IsMirror
|
||||
}
|
||||
|
||||
func (repo *Repository) NextIssueIndex() int64 {
|
||||
return int64(repo.NumIssues+repo.NumPulls) + 1
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue