Search: Allowed actions (#52529)

This commit is contained in:
Artur Wierzbicki
2022-07-23 04:42:43 +04:00
committed by GitHub
parent ce04a01ae9
commit bcfa4fabf6
11 changed files with 1163 additions and 19 deletions

View File

@@ -175,5 +175,13 @@ func (s *StandardSearchService) DoDashboardQuery(ctx context.Context, user *back
return rsp
}
return doSearchQuery(ctx, s.logger, index, filter, q, s.extender.GetQueryExtender(q), s.cfg.AppSubURL)
response := doSearchQuery(ctx, s.logger, index, filter, q, s.extender.GetQueryExtender(q), s.cfg.AppSubURL)
if q.WithAllowedActions {
if err := s.addAllowedActionsField(ctx, orgID, signedInUser, response); err != nil {
s.logger.Error("error when adding the allowedActions field", "err", err)
}
}
return response
}