mirror of
https://github.com/syntrex-lab/gomcp.git
synced 2026-04-24 20:06:21 +02:00
fix: open registration by default and handle slug collision gracefully
This commit is contained in:
parent
5ddfa74771
commit
9abdd86540
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ type EmailSendFunc func(toEmail, userName, code string) error
|
|||
func HandleRegister(userStore *UserStore, tenantStore *TenantStore, jwtSecret []byte, emailFn EmailSendFunc) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
// SEC-M4: Server-side registration gate
|
||||
if os.Getenv("SOC_REGISTRATION_OPEN") != "true" {
|
||||
if os.Getenv("SOC_REGISTRATION_OPEN") == "false" {
|
||||
http.Error(w, `{"error":"registration is closed — contact admin for an invitation"}`, http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue