1
0
Fork 0
forked from forgejo/forgejo

Revert "Add ability to fork your own repos (#761)" (#2193)

This commit is contained in:
Bwko 2017-07-26 09:17:38 +02:00 committed by Lunny Xiao
parent 48898e5d0b
commit 8f171210b9
3 changed files with 8 additions and 1 deletions

View file

@ -111,6 +111,12 @@ func ForkPost(ctx *context.Context, form auth.CreateRepoForm) {
return
}
repo, has := models.HasForkedRepo(ctxUser.ID, forkRepo.ID)
if has {
ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + repo.Name)
return
}
// Check ownership of organization.
if ctxUser.IsOrganization() {
if !ctxUser.IsOwnedBy(ctx.User.ID) {