From 58d8c1aa8a094b94e7b8be5e0444356b628cee59 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Fri, 2 Jun 2023 16:59:56 +0200 Subject: [PATCH] fix disable users by group --- changelog/unreleased/fix-disable-user.md | 5 +++++ services/graph/pkg/identity/ldap.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-disable-user.md diff --git a/changelog/unreleased/fix-disable-user.md b/changelog/unreleased/fix-disable-user.md new file mode 100644 index 00000000000..fa863158196 --- /dev/null +++ b/changelog/unreleased/fix-disable-user.md @@ -0,0 +1,5 @@ +Bugfix: Fix error message when disabling users + +When we disable users by adding them to a group we do not need to update the user entry. + +https://github.com/owncloud/ocis/pull/6435 diff --git a/services/graph/pkg/identity/ldap.go b/services/graph/pkg/identity/ldap.go index c64eaab9a4a..7189d45b028 100644 --- a/services/graph/pkg/identity/ldap.go +++ b/services/graph/pkg/identity/ldap.go @@ -1178,7 +1178,7 @@ func (i *LDAP) updateAccountEnabledState(logger log.Logger, accountEnabled bool, } else { err = i.disableUser(logger, e.DN) } - updateNeeded = true + updateNeeded = false } return updateNeeded, err