Updated dependency versions (viper, cobra, and ldap)
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
ldap "gopkg.in/ldap.v2"
|
||||
ldap "github.com/go-ldap/ldap/v3"
|
||||
|
||||
"git.metaunix.net/metaunix.net/muldap/lib/util"
|
||||
)
|
||||
@ -66,7 +66,7 @@ var userAddCmd = &cobra.Command{
|
||||
userHome := fmt.Sprintf(viper.GetString("user.home_directory"), flagUserUsername)
|
||||
|
||||
// create a new add request object
|
||||
addRequest := ldap.NewAddRequest(userDn)
|
||||
addRequest := ldap.NewAddRequest(userDn, nil)
|
||||
// add user attributes to the request
|
||||
addRequest.Attribute(viper.GetString("user.uid_attr"), []string{flagUserUsername})
|
||||
addRequest.Attribute("objectClass", viper.GetStringSlice("user.object_class"))
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
ldap "gopkg.in/ldap.v2"
|
||||
ldap "github.com/go-ldap/ldap/v3"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
ldap "gopkg.in/ldap.v2"
|
||||
ldap "github.com/go-ldap/ldap/v3"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -54,7 +54,7 @@ var userEditCmd = &cobra.Command{
|
||||
userDn := fmt.Sprintf("%s=%s,%s", viper.GetString("user.uid_attr"), flagUserUsername, viper.GetString("user.base_ou"))
|
||||
|
||||
// create a new edit request object
|
||||
modifyRequest := ldap.NewModifyRequest(userDn)
|
||||
modifyRequest := ldap.NewModifyRequest(userDn, nil)
|
||||
// loop through list of attribute changes
|
||||
for _, attrModify := range flagUserAttributes {
|
||||
attr := strings.Split(attrModify, "=")
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
ldap "gopkg.in/ldap.v2"
|
||||
ldap "github.com/go-ldap/ldap/v3"
|
||||
|
||||
cli "git.metaunix.net/metaunix.net/muldap/lib/cli"
|
||||
)
|
||||
|
Reference in New Issue
Block a user