forked from forgejo/forgejo
Let not-logged-in users view releases (#1999)
This commit is contained in:
parent
6e452c4da7
commit
4df1a24096
3 changed files with 17 additions and 4 deletions
|
@ -79,7 +79,10 @@ func Releases(ctx *context.Context) {
|
|||
|
||||
// Temporary cache commits count of used branches to speed up.
|
||||
countCache := make(map[string]int64)
|
||||
cacheUsers := map[int64]*models.User{ctx.User.ID: ctx.User}
|
||||
cacheUsers := make(map[int64]*models.User)
|
||||
if ctx.User != nil {
|
||||
cacheUsers[ctx.User.ID] = ctx.User
|
||||
}
|
||||
var ok bool
|
||||
|
||||
releasesToDisplay := make([]*models.Release, 0, len(releases))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue