mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Mirror changes
This commit is contained in:
@ -51,11 +51,14 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
|
||||
if !ctx.Repo.IsOwner {
|
||||
user, err = models.GetUserByName(params["username"])
|
||||
if err != nil {
|
||||
if redirect {
|
||||
if err == models.ErrUserNotExist {
|
||||
ctx.Handle(404, "RepoAssignment", err)
|
||||
return
|
||||
} else if redirect {
|
||||
ctx.Redirect("/")
|
||||
return
|
||||
}
|
||||
ctx.Handle(200, "RepoAssignment", err)
|
||||
ctx.Handle(500, "RepoAssignment", err)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
@ -67,7 +70,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
|
||||
ctx.Redirect("/")
|
||||
return
|
||||
}
|
||||
ctx.Handle(200, "RepoAssignment", errors.New("invliad user account for single repository"))
|
||||
ctx.Handle(403, "RepoAssignment", errors.New("invliad user account for single repository"))
|
||||
return
|
||||
}
|
||||
ctx.Repo.Owner = user
|
||||
|
Reference in New Issue
Block a user