explore: able list and search for private but accessible repositories (#3088)

This commit is contained in:
Unknwon
2017-03-17 19:17:40 -04:00
parent 2d4dc544be
commit cac7af2c78
7 changed files with 90 additions and 93 deletions

View File

@@ -42,6 +42,13 @@ type Context struct {
Org *Organization
}
func (ctx *Context) UserID() int64 {
if !ctx.IsSigned {
return 0
}
return ctx.User.ID
}
// HasError returns true if error occurs in form validation.
func (ctx *Context) HasApiError() bool {
hasErr, ok := ctx.Data["HasError"]