From 43effc0cbac48cea213c263d7f2b4c90d293aaab Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Thu, 16 Jul 2020 10:32:36 +0545 Subject: [PATCH 1/2] Fix the account and group id mismatch in delete group method --- pkg/service/v0/groups.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/service/v0/groups.go b/pkg/service/v0/groups.go index 83989ecb97..666d8608d6 100644 --- a/pkg/service/v0/groups.go +++ b/pkg/service/v0/groups.go @@ -248,8 +248,8 @@ func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, ou // delete memberof relationship in users for i := range g.Members { err = s.RemoveMember(c, &proto.RemoveMemberRequest{ - GroupId: g.Members[i].Id, - AccountId: id, + AccountId: g.Members[i].Id, + GroupId: id, }, g) if err != nil { s.log.Error().Err(err).Str("groupid", id).Str("accountid", g.Members[i].Id).Msg("could not remove account memberof, skipping") From 2bd43221230d5bfb881098e03a9113ca735daa14 Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Thu, 16 Jul 2020 10:38:14 +0545 Subject: [PATCH 2/2] Add changelog item --- changelog/unreleased/fix-account-group-id.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 changelog/unreleased/fix-account-group-id.md diff --git a/changelog/unreleased/fix-account-group-id.md b/changelog/unreleased/fix-account-group-id.md new file mode 100644 index 0000000000..81a1dc4c04 --- /dev/null +++ b/changelog/unreleased/fix-account-group-id.md @@ -0,0 +1,8 @@ +Bugfix: Fix the accountId and groupId mismatch in DeleteGroup Method + +We've fixed a bug in deleting the groups. + +The accountId and GroupId were swapped when removing the member from a group after deleting +the group. + +https://github.com/owncloud/ocis-accounts/pull/60