mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-03-28 23:25:32 +00:00
Return after error (#1875)
This allows you to work around the max timeout on the server.
This commit is contained in:
parent
0c3021473f
commit
c3c1d3bcb5
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue