From c3c1d3bcb5853cf7aed56d2446e04d32e22e9768 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:46:48 +0200 Subject: [PATCH] Return after error (#1875) This allows you to work around the max timeout on the server. --- server/api/repo.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/api/repo.go b/server/api/repo.go index fb6dff90d..b78bdb4b6 100644 --- a/server/api/repo.go +++ b/server/api/repo.go @@ -166,6 +166,7 @@ func PatchRepo(c *gin.Context) { if in.Timeout != nil && *in.Timeout > server.Config.Pipeline.MaxTimeout && !user.Admin { c.String(http.StatusForbidden, fmt.Sprintf("Timeout is not allowed to be higher than max timeout (%dmin)", server.Config.Pipeline.MaxTimeout)) + return } if in.IsTrusted != nil && *in.IsTrusted != repo.IsTrusted && !user.Admin { log.Trace().Msgf("user '%s' wants to make repo trusted without being an instance admin ", user.Login)