Add configuration option to disable signup

close #51

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-03-19 16:43:49 +01:00
parent a72c0269bb
commit ffa4c93bfd
4 changed files with 32 additions and 10 deletions

View File

@@ -21,8 +21,9 @@ import (
type (
authConfig struct {
Cookie cookieConfig `json:"cookie"`
Password passwordConfig `json:"password"`
Cookie cookieConfig `json:"cookie"`
Password passwordConfig `json:"password"`
DisableSignup bool `json:"disable-signup"`
}
cookieConfig struct {

View File

@@ -87,6 +87,7 @@ func New() *Implm {
Duration: 24,
Domain: "localhost",
},
DisableSignup: false,
},
AWS: awsConfig{
Region: "us-east-1",
@@ -172,6 +173,7 @@ func (impl *Implm) Run(
hp,
impl.cfg.Auth.Cookie.Secret,
impl.cfg.Hostname,
impl.cfg.Auth.DisableSignup,
)
if err != nil {
return fmt.Errorf("cannot create usrmgr service: %w", err)