feat(groups): Only allow the "null" driver for multi-tenant setups

This commit is contained in:
Ralf Haferkamp
2025-09-30 14:28:48 +02:00
committed by Ralf Haferkamp
parent 736fb9db1f
commit f096285769
2 changed files with 5 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package parser
import (
"errors"
"fmt"
occfg "github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/shared"
@@ -38,6 +39,9 @@ func Validate(cfg *config.Config) error {
return shared.MissingJWTTokenError(cfg.Service.Name)
}
if cfg.Commons.MultiTenantEnabled && cfg.Driver != "null" {
return fmt.Errorf("Multi-tenant support is enabled. Only the 'null'-driver is supported by 'groups' service.")
}
if cfg.Drivers.LDAP.BindPassword == "" && cfg.Driver == "ldap" {
return shared.MissingLDAPBindPassword(cfg.Service.Name)
}