Updated dependency versions (viper, cobra, and ldap)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
2022-06-11 01:15:44 -04:00
parent b500c3262c
commit 092c9f3791
13 changed files with 508 additions and 126 deletions

View File

@ -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"))

View File

@ -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() {

View File

@ -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, "=")

View File

@ -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"
)