Allow admin to pull many times

This commit is contained in:
nemunaire 2022-09-25 13:18:10 +02:00
parent 888de876c0
commit f1c663ac4a
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ func declareAPIAuthRepositoriesRoutes(router *gin.RouterGroup) {
now := time.Now()
if repo.LastCheck != nil && !repo.LastCheck.Before(now.Add(-5*time.Minute)) {
if repo.LastCheck != nil && !repo.LastCheck.Before(now.Add(-5*time.Minute)) && !c.MustGet("LoggedUser").(*User).IsAdmin {
c.AbortWithStatusJSON(http.StatusPaymentRequired, gin.H{"errmsg": "Please wait between two pulls."})
return
}