Allow admin to pull many times
This commit is contained in:
parent
888de876c0
commit
f1c663ac4a
@ -183,7 +183,7 @@ func declareAPIAuthRepositoriesRoutes(router *gin.RouterGroup) {
|
|||||||
|
|
||||||
now := time.Now()
|
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."})
|
c.AbortWithStatusJSON(http.StatusPaymentRequired, gin.H{"errmsg": "Please wait between two pulls."})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user