Commit graph

10 commits

Author SHA1 Message Date
Bob Van Landuyt
28acd2b087 Hide confidential events in ruby
We're filtering the events using `Event#visible_to_user?`.

At most we're loading 100 events at once.

Pagination is also dealt with in the finder, but the resulting array
is wrapped in a `Kaminari.paginate_array` so the API's pagination
helpers keep working. We're passing the total count into that
paginatable array, which would include confidential events. But we're
not disclosing anything.
2018-12-17 18:47:53 +01:00
Jasper Maes
5d5481519d Rails5: Passing a class as a value in an Active Record query is deprecated 2018-11-17 16:14:36 +01:00
Nick Thomas
45ced6c5de
Redact events shown in the events API 2018-09-21 14:33:08 +01:00
Stan Hu
32b96bfd81 Merge branch 'frozen-string-app-finders-graphql' into 'master'
Enable frozen string in app/graphql + app/finders

See merge request gitlab-org/gitlab-ce!21681
2018-09-13 19:44:31 +00:00
gfyoung
47b3038434 Enable frozen string in app/graphql + app/finders
Partially addresses #47424.
2018-09-11 12:15:23 -07:00
Yorick Peterse
2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Bob Van Landuyt
148816cd67 Port read_cross_project ability from EE 2018-02-22 17:11:36 +01:00
Grzegorz Bizon
0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Yorick Peterse
c9e277ee01
Refactor GroupProjectsFinder#init_collection
This optimises how GroupProjectsFinder builds it collection, producing
simpler and faster queries in the process. It also cleans up the code a
bit to make it easier to understand.
2017-06-19 19:11:35 +02:00
Mark Fletcher
ad3e180ed3 Introduce an Events API
* Meld the following disparate endpoints:
 * `/projects/:id/events`
 * `/events`
 * `/users/:id/events`
+ Add result filtering to the above endpoints:
 * action
 * target_type
 * before and after dates
2017-06-06 20:16:41 +08:00