mirror of
https://github.com/gogs/gogs.git
synced 2025-12-21 15:50:00 +01:00
explore: able list and search for private but accessible repositories (#3088)
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user