|
|
@ -184,6 +184,7 @@ func HTTP(ctx *context.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if !isPublicPull { |
|
|
|
if !isPublicPull { |
|
|
|
has, err := models.HasAccess(authUser.ID, repo, accessMode) |
|
|
|
has, err := models.HasAccess(authUser.ID, repo, accessMode) |
|
|
@ -211,7 +212,6 @@ func HTTP(ctx *context.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if !repo.CheckUnitUser(authUser.ID, authUser.IsAdmin, unitType) { |
|
|
|
if !repo.CheckUnitUser(authUser.ID, authUser.IsAdmin, unitType) { |
|
|
|
ctx.HandleText(http.StatusForbidden, fmt.Sprintf("User %s does not have allowed access to repository %s 's code", |
|
|
|
ctx.HandleText(http.StatusForbidden, fmt.Sprintf("User %s does not have allowed access to repository %s 's code", |
|
|
|