mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-21 12:09:40 -06:00
feat(groups): Only allow the "null" driver for multi-tenant setups
This commit is contained in:
committed by
Ralf Haferkamp
parent
736fb9db1f
commit
f096285769
@@ -334,6 +334,7 @@ config = {
|
||||
"GRAPH_LDAP_SERVER_UUID": True,
|
||||
"GRAPH_LDAP_GROUP_CREATE_BASE_DN": "ou=custom,ou=groups,dc=opencloud,dc=eu",
|
||||
"GRAPH_LDAP_REFINT_ENABLED": True,
|
||||
"GROUPS_DRIVER": "null",
|
||||
"FRONTEND_READONLY_USER_ATTRIBUTES": "user.onPremisesSamAccountName,user.displayName,user.mail,user.passwordProfile,user.accountEnabled,user.appRoleAssignments",
|
||||
"OC_LDAP_SERVER_WRITE_ENABLED": False,
|
||||
"OC_EXCLUDE_RUN_SERVICES": "idm",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user