mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 12:00:02 +00:00
Add server config to disable user registered agents (#4206)
This commit is contained in:
@@ -213,6 +213,11 @@ var flags = append([]cli.Flag{
|
||||
Name: "agent-secret",
|
||||
Usage: "server-agent shared password",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Sources: cli.EnvVars("WOODPECKER_DISABLE_USER_AGENT_REGISTRATION"),
|
||||
Name: "disable-user-agent-registration",
|
||||
Usage: "Disable user registered agents",
|
||||
},
|
||||
&cli.DurationFlag{
|
||||
Sources: cli.EnvVars("WOODPECKER_KEEPALIVE_MIN_TIME"),
|
||||
Name: "keepalive-min-time",
|
||||
|
@@ -167,6 +167,9 @@ func setupEvilGlobals(ctx context.Context, c *cli.Command, s store.Store) (err e
|
||||
return fmt.Errorf("could not setup log store: %w", err)
|
||||
}
|
||||
|
||||
// agents
|
||||
server.Config.Agent.DisableUserRegisteredAgentRegistration = c.Bool("disable-user-agent-registration")
|
||||
|
||||
// authentication
|
||||
server.Config.Pipeline.AuthenticatePublicRepos = c.Bool("authenticate-public-repos")
|
||||
|
||||
|
Reference in New Issue
Block a user