only activate github auth if no other is active
This commit is contained in:
parent
10db40a5a8
commit
eac9acc041
|
@ -761,6 +761,17 @@ class NixConfigurator(ConfiguratorBase):
|
||||||
config["secretsProviders"] = config.get("secretsProviders", [])
|
config["secretsProviders"] = config.get("secretsProviders", [])
|
||||||
config["secretsProviders"].append(systemd_secrets)
|
config["secretsProviders"].append(systemd_secrets)
|
||||||
config["www"] = config.get("www", {})
|
config["www"] = config.get("www", {})
|
||||||
|
config["www"]["change_hook_dialects"] = config["www"].get(
|
||||||
|
"change_hook_dialects", {}
|
||||||
|
)
|
||||||
|
config["www"]["change_hook_dialects"]["github"] = {
|
||||||
|
"secret": webhook_secret,
|
||||||
|
"strict": True,
|
||||||
|
"token": self.github.token(),
|
||||||
|
"github_property_whitelist": "*",
|
||||||
|
}
|
||||||
|
|
||||||
|
if not config["www"].get("auth"):
|
||||||
config["www"]["avatar_methods"] = config["www"].get("avatar_methods", [])
|
config["www"]["avatar_methods"] = config["www"].get("avatar_methods", [])
|
||||||
config["www"]["avatar_methods"].append(util.AvatarGitHub())
|
config["www"]["avatar_methods"].append(util.AvatarGitHub())
|
||||||
config["www"]["auth"] = util.GitHubAuth(
|
config["www"]["auth"] = util.GitHubAuth(
|
||||||
|
@ -775,12 +786,3 @@ class NixConfigurator(ConfiguratorBase):
|
||||||
util.AnyControlEndpointMatcher(role="admins"),
|
util.AnyControlEndpointMatcher(role="admins"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
config["www"]["change_hook_dialects"] = config["www"].get(
|
|
||||||
"change_hook_dialects", {}
|
|
||||||
)
|
|
||||||
config["www"]["change_hook_dialects"]["github"] = {
|
|
||||||
"secret": webhook_secret,
|
|
||||||
"strict": True,
|
|
||||||
"token": self.github.token(),
|
|
||||||
"github_property_whitelist": "*",
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue