fix(activitylog): dont use service user context

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2024-06-24 16:23:55 +02:00
parent 2f19daa9ef
commit 76ca53bd31
3 changed files with 19 additions and 19 deletions
+1 -6
View File
@@ -200,17 +200,12 @@ func NewActivity(message string, ts time.Time, eventID string, vars map[string]i
}
// GetVars calls other service to gather the required data for the activity variables
func (s *ActivitylogService) GetVars(opts ...ActivityOption) (map[string]interface{}, error) {
func (s *ActivitylogService) GetVars(ctx context.Context, opts ...ActivityOption) (map[string]interface{}, error) {
gwc, err := s.gws.Next()
if err != nil {
return nil, err
}
ctx, err := utils.GetServiceUserContext(s.cfg.ServiceAccount.ServiceAccountID, gwc, s.cfg.ServiceAccount.ServiceAccountSecret)
if err != nil {
return nil, err
}
vars := make(map[string]interface{})
for _, opt := range opts {
if err := opt(ctx, gwc, vars); err != nil {