Merge branch 'master' into update-bridge-docs
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"path"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/flags"
|
||||
pkgos "github.com/owncloud/ocis/ocis-pkg/os"
|
||||
"github.com/owncloud/ocis/storage/pkg/config"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// LDAPWithConfig applies LDAP cfg to the flagset
|
||||
@@ -23,6 +26,20 @@ func LDAPWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"STORAGE_LDAP_PORT"},
|
||||
Destination: &cfg.Reva.LDAP.Port,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-cacert",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.LDAP.CACert, path.Join(pkgos.MustUserConfigDir("ocis", "ldap"), "ldap.crt")),
|
||||
Usage: "Path to a trusted Certificate file (in PEM format) for the LDAP Connection",
|
||||
EnvVars: []string{"STORAGE_LDAP_CACERT"},
|
||||
Destination: &cfg.Reva.LDAP.CACert,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "ldap-insecure",
|
||||
Value: flags.OverrideDefaultBool(cfg.Reva.LDAP.Insecure, false),
|
||||
Usage: "Disable TLS certificate and hostname validation",
|
||||
EnvVars: []string{"STORAGE_LDAP_INSECURE"},
|
||||
Destination: &cfg.Reva.LDAP.Insecure,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-base-dn",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.LDAP.BaseDN, "dc=ocis,dc=test"),
|
||||
|
||||
Reference in New Issue
Block a user