diff --git a/services/context/repo.go b/services/context/repo.go index 1084f5ce9c..a710a3f80f 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -455,7 +455,7 @@ func repoAssignmentLegacy(ctx *Context, data *repoAssignmentPrepareDataStruct) { return } } else { - ctx.NotFound(nil) + ctx.HTTPError(http.StatusForbidden, "You do not have permission to access this repository") return } }