Merge pull request #60 from owncloud/fix-account-group-id

Fix the account and group id mismatch in delete group method
This commit is contained in:
Benedikt Kulmann
2020-07-16 07:50:45 +02:00
committed by GitHub
2 changed files with 10 additions and 2 deletions
@@ -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
+2 -2
View File
@@ -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")