- Feb 25, 2020
-
-
GitLab Bot authored
-
- Feb 19, 2020
-
-
GitLab Bot authored
-
- Feb 14, 2020
-
-
GitLab Bot authored
-
- Feb 13, 2020
-
-
GitLab Bot authored
-
- Jan 29, 2020
-
-
GitLab Bot authored
-
- Jan 23, 2020
-
-
GitLab Bot authored
-
- Jan 20, 2020
-
-
GitLab Bot authored
-
- Jan 16, 2020
-
-
GitLab Bot authored
-
- Dec 10, 2019
-
-
GitLab Bot authored
-
- Dec 02, 2019
-
-
GitLab Bot authored
-
- Nov 19, 2019
-
-
GitLab Bot authored
-
- Oct 18, 2019
-
-
GitLab Bot authored
-
- Oct 17, 2019
-
-
GitLab Bot authored
-
- Sep 25, 2019
-
-
GitLab Bot authored
-
- Sep 18, 2019
-
-
GitLab Bot authored
-
- Sep 13, 2019
-
-
GitLab Bot authored
-
- Sep 10, 2019
-
-
Markus Koller authored
- Avoid N+1 queries for authors and comment counts - Avoid an additional snippet existence query
-
- Jun 28, 2019
-
-
Luke Duncalfe authored
Adding new `AddAwardEmoji`, `RemoveAwardEmoji` and `ToggleAwardEmoji` GraphQL mutations. Adding new `#authorized_find_with_pre_checks!` and (unused, but for completeness `#authorized_find_with_post_checks!`) authorization methods. These allow us to perform an authorized find, and run our own additional checks before or after the authorization runs. https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
-
- Mar 28, 2019
-
-
Nick Thomas authored
-
- Jan 24, 2019
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Dec 20, 2018
- Nov 05, 2018
-
-
Yorick Peterse authored
This completely rewrites the SnippetsFinder class from the ground up in order to improve its performance. The old code was beyond salvaging. It was complex, included various Rails 5 workarounds, comments that shouldn't be necessary, and most important of all: it produced a really poorly performing database query. As a result, I opted for rewriting the finder from scratch, instead of trying to patch the existing code. Instead of trying to reuse as many existing methods as possible, I opted for defining new methods specifically meant for the SnippetsFinder. This requires some extra code here and there, but allows us to have much more control over the resulting SQL queries. It is these changes that then allow us to produce a _much_ more efficient query. To illustrate how bad the old query was, we will use my own snippets as an example. Currently I have 52 snippets, most of which are global ones. To retrieve these, you would run the following Ruby code: user = User.find_by(username: 'yorickpeterse') SnippetsFinder.new(user, author: user).execute On GitLab.com the resulting query will take between 10 and 15 seconds to run, producing the query plan found at https://explain.depesz.com/s/Y5IX. Apart from the long execution time, the total number of buffers (the sum of all shared hits) is around 185 GB, though the real number is probably (hopefully) much lower as I doubt simply summing these numbers produces the true total number of buffers used. The new query's plan can be found at https://explain.depesz.com/s/wHdN, and this query takes between 10 and 100-ish milliseconds to run. The total number of buffers used is only about 30 MB. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/52639
-
- Oct 23, 2018
-
-
Jan Provaznik authored
It's possible that user pastes accidentally also unsubscribe link which is included in footer of notification emails. This unsubscribe link contains personal token which attacker then use to act as the original user (e.g. for sending comments under his/her identity).
-
- Sep 17, 2018
-
-
Yorick Peterse authored
This commit adds the module `FromUnion`, which provides the class method `from_union`. This simplifies the process of selecting data from the result of a UNION, and reduces the likelihood of making mistakes. As a result, instead of this: union = Gitlab::SQL::Union.new([foo, bar]) Foo.from("(#{union.to_sql}) #{Foo.table_name}") We can now write this instead: Foo.from_union([foo, bar]) This commit also includes some changes to make this new setup work properly. For example, a bug in Rails 4 (https://github.com/rails/rails/issues/24193) would break the use of `from("sub-query-here").includes(:relation)` in certain cases. There was also a CI query which appeared to repeat a lot of conditions from an outer query on an inner query, which isn't necessary. Finally, we include a RuboCop cop to ensure developers use this new module, instead of using Gitlab::SQL::Union directly. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
-
- Jul 30, 2018
-
-
Bob Van Landuyt authored
The status is shown for - The author of a commit when viewing a commit - Notes on a commit (regular/diff) - The user that triggered a pipeline when viewing a pipeline - The author of a merge request when viewing a merge request - The author of notes on a merge request (regular/diff) - The author of an issue when viewing an issue - The author of notes on an issue - The author of a snippet when viewing a snippet - The author of notes on a snippet - A user's profile page - The list of members of a group/user
-
- Jul 26, 2018
-
-
gfyoung authored
Partially addresses #47424.
-
- Mar 07, 2018
-
-
Jan Provaznik authored
* adds basic discussions API for issues and snippets * reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
-
- Feb 09, 2018
-
-
Douwe Maan authored
Merge branch 'security-10-4-25223-snippets-finder-doesnt-obey-feature-visibility' into 'security-10-4' [Port for security-10-4]: Makes SnippetFinder ensure feature visibility
-
- Feb 02, 2018
-
-
Mario de la Ossa authored
-
- Nov 27, 2017
-
-
Douwe Maan authored
-
- Nov 24, 2017
-
-
Douwe Maan authored
-
- Nov 23, 2017
-
-
Jarka Kadlecova authored
-
- Aug 31, 2017
-
-
Sean McGivern authored
The initializers including this were doing so at the top level, so every object loaded after them had a `current_application_settings` method. However, if someone had rack-attack enabled (which was loaded before these initializers), it would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't have that method. To fix this: 1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need `Object.new.current_application_settings` to work. 2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it like that in several places. 3. Change the initializers to use that new form.
-
- Jul 06, 2017
-
-
Yorick Peterse authored
This is allowed for existing instances so we don't end up 76 offenses right away, but for new code one should _only_ use this if they _have_ to remove non database data. Even then it's usually better to do this in a service class as this gives you more control over how to remove the data (e.g. in bulk).
-
- Jul 05, 2017
-
-
Tiago Botelho authored
-
- May 31, 2017
-
-
Luke "Jared" Bennett authored
-
Jarka Kadlecova authored
-
- May 10, 2017
-
-
Refactor snippets finder & dont return internal snippets for external users See merge request !2094
-
- May 04, 2017
-
-
blackst0ne authored
-