diff --git a/README.md b/README.md index c16f721aa..7166daed7 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ There are 3 ways to install Gogs: - Mail Service, modules design is inspired by [WeTalk](https://github.com/beego/wetalk). - System Monitor Status is inspired by [GoBlog](https://github.com/fuxiaohei/goblog). - Usage and modification from [beego](http://beego.me) modules. -- Thanks [lavachen](http://www.lavachen.cn/) for designing Logo. +- Thanks [lavachen](http://www.lavachen.cn/) and [Rocker](http://weibo.com/rocker1989) for designing Logo. - Thanks [gobuild.io](http://gobuild.io) for providing binary compile and download service. - Great thanks to [Docker China](http://www.dockboard.org/) for providing [dockerfiles](https://github.com/gogits/gogs/tree/master/dockerfiles). diff --git a/README_ZH.md b/README_ZH.md index b82782235..177c679a8 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -56,7 +56,7 @@ Gogs 完全使用 Go 语言来实现对 Git 数据的操作,实现 **零** 依 - [beego](http://beego.me) 模块的使用与修改。 - [martini](http://martini.codegangsta.io/) 的路由与中间件机制。 - 感谢 [gobuild.io](http://gobuild.io) 提供二进制编译与下载服务。 -- 感谢 [lavachen](http://www.lavachen.cn/) 设计的 Logo。 +- 感谢 [lavachen](http://www.lavachen.cn/) 和 [Rocker](http://weibo.com/rocker1989) 设计的 Logo。 - 感谢 [Docker 中文社区](http://www.dockboard.org/) 提供的 [dockerfiles](https://github.com/gogits/gogs/tree/master/dockerfiles)。 ## 贡献成员 diff --git a/gogs.go b/gogs.go index d723aa33a..27d5d6886 100644 --- a/gogs.go +++ b/gogs.go @@ -19,7 +19,7 @@ import ( // Test that go1.2 tag above is included in builds. main.go refers to this definition. const go12tag = true -const APP_VER = "0.3.1.0427 Alpha" +const APP_VER = "0.3.1.0430 Alpha" func init() { base.AppVer = APP_VER diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 2d2778cb0..e31deac55 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -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 diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl index b8cba5faa..da6865b8e 100644 --- a/templates/base/navbar.tmpl +++ b/templates/base/navbar.tmpl @@ -4,7 +4,7 @@ Dashboard Help{{if .IsSigned}} - {{if .HasAccess}}{{end}} + {{end}} user-avatar