mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Let not-logged-in users view releases (#1999)
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user