Browse Source

Don't fail if there is no error to add user to group

communities
meskio 8 months ago
parent
commit
5075e21972
Signed by: meskio
GPG Key ID: 52B8F5AC97A2DA86
  1. 6
      ldap/group.go

6
ldap/group.go

@ -145,12 +145,12 @@ func (l Ldap) EmptyGroup(group string) error {
// AddUserGroup add user into the group members
func (l Ldap) AddUserGroup(user string, group string) error {
u, err := l.GetUser(user)
if !errors.Is(err, ErrNotFound) || u.Locked != Unlocked {
return ErrNotFound
}
if err != nil {
return err
}
if u.Locked != Unlocked {
return ErrNotFound
}
conn, err := l.connect()
if err != nil {

Loading…
Cancel
Save