more HTTP clone word fix

This commit is contained in:
Unknwon 2015-11-22 13:01:42 -05:00
parent efaf60ba5a
commit b2fb7e3fd2
4 changed files with 5 additions and 5 deletions

View file

@ -448,7 +448,7 @@ func ParseCompareInfo(ctx *middleware.Context) (*models.User, *models.Repository
// Check if current user has fork of repository.
headRepo, has := models.HasForkedRepo(headUser.Id, repo.ID)
if !has || !ctx.User.IsAdminOfRepo(headRepo) {
if !has || (!ctx.User.IsAdminOfRepo(headRepo) && !ctx.User.IsAdmin) {
ctx.Handle(404, "HasForkedRepo", nil)
return nil, nil, nil, nil, "", ""
}