Skip to content

Commit

Permalink
fix panic in userlog service
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <[email protected]>
  • Loading branch information
kobergj committed Apr 24, 2023
1 parent 728558c commit 4354f5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-userlog-panic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix userlog panic

userlog services paniced because of `nil` ctx. That is fixed now

https://github.com/owncloud/ocis/pull/6114
4 changes: 4 additions & 0 deletions services/userlog/pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ func (ul *UserlogService) resolveID(ctx context.Context, userid *user.UserId, gr
return []string{userid.GetOpaqueId()}, nil
}

if ctx == nil {
return nil, errors.New("need ctx to resolve group id")
}

return ul.resolveGroup(ctx, groupid.GetOpaqueId())
}

Expand Down

0 comments on commit 4354f5a

Please sign in to comment.