Create admin settings and moved signup disable setting there

This commit is contained in:
Thomas Miceli
2023-04-17 00:17:06 +02:00
parent dbdd38694d
commit dba3f4be44
10 changed files with 127 additions and 16 deletions

View File

@ -5,7 +5,6 @@ import (
"github.com/labstack/echo/v4"
"github.com/rs/zerolog/log"
"gorm.io/gorm"
"opengist/internal/config"
"opengist/internal/models"
)
@ -16,7 +15,7 @@ func register(ctx echo.Context) error {
}
func processRegister(ctx echo.Context) error {
if config.C.DisableSignup {
if getData(ctx, "signupDisabled") == true {
return errorRes(403, "Signing up is disabled", nil)
}