- Sep 13, 2019
-
-
GitLab Bot authored
-
- Aug 23, 2019
-
-
Stan Hu authored
Projects that have a pipeline may need to check whether the user has permission to read the build (`can?(current_user, :read_build, project)`), which requires checking the `project_features` table. This would cause an N+1 SQL query for each project. This change also has a beneficial side effect that may avoid a race condition. When a user deletes a project, the project is queued for deletion and the user is redirected back to the dashboard page. However, the following may happen: 1. The dashboard page may load this deleted project in the list of 20 projects. 2. The view will load the project pipeline status from the cache and attempt to show each project. 3. When the view encounters the deleted project, it calls `can?(current_user, :read_build, project)` to determine whether to display the pipeline status. 4. Sidekiq deletes the project from the database. 5. However, since the deleted project is still loaded in memory, it will attempt to call `project.project_feature.access_level`. 6. Since `project_feature` was not eager loaded, a lazy `SELECT` call is made to the database. 7. This `SELECT` call returns nothing, and the user sees a 500 error. By eager loading `project_feature`, we can ensure that we have a consistent view and avoid records from being deleted later. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66482
-
- Aug 21, 2019
-
-
George Koltsov authored
Sorting preference functionality has been extracted from `IssuableCollections` to a new `SortingPreference` concern in order to reuse this functionality in projects (and groups in the future).
-
- Jul 04, 2019
-
-
David Palubin authored
-
- Jun 28, 2019
-
-
Ash McKenzie authored
Check if we're gitlab.com and the :user_onboarding feature flag is enabled.
-
- Jun 05, 2019
-
-
- Render EE specific partial if exists
-
- Apr 09, 2019
-
-
Zeger-Jan van de Weg authored
To make sure all known issues are linked to the correct epic, I've gone through the code base, and updated the comments where required.
-
- Mar 19, 2019
-
-
Alejandro Rodríguez authored
This mistake seems to have always been there, but it only resulted in errors on the `/explore*.json` since they were the one that _actually_ relied on the local variables.
-
- Feb 27, 2019
-
-
Thong Kuah authored
Allow developers to load GitLab root page locally without errors. Since we know this issue for a while now, no point letting the exception be triggered constantly.
-
- Jan 15, 2019
-
-
George Tsiolis authored
-
- Dec 10, 2018
-
-
Gabriel Mazetto authored
This removes remaining N+1 queries
-
- Nov 29, 2018
-
-
Cindy Pallares authored
[master] Resolve "Personal access token with only `read_user` scope can be used to authenticate any web request" See merge request gitlab/gitlabhq!2583
-
- Nov 23, 2018
-
-
James Lopez authored
-
- Sep 23, 2018
-
-
gfyoung authored
Enables frozen string for the following: * app/controllers/dashboard/**/*.rb * app/controllers/explore/**/*.rb * app/controllers/google_api/**/*.rb * app/controllers/groups/**/*.rb * app/controllers/import/**/*.rb * app/controllers/instance_statistics/**/*.rb * app/controllers/ldap/**/*.rb * app/controllers/oauth/**/*.rb * app/controllers/profiles/**/*.rb Partially addresses #47424.
-
- Sep 11, 2018
-
-
Yorick Peterse authored
This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
-
- Jul 06, 2018
-
-
- Feb 22, 2018
-
-
Bob Van Landuyt authored
-
- Dec 07, 2017
-
-
Mike Greiling authored
-
- Nov 06, 2017
-
-
- Sep 11, 2017
-
-
Yorick Peterse authored
This solves an N+1 query problem where we'd run multiple queries when getting the namespace owners of the displayed projects.
-
- Aug 10, 2017
-
-
Yorick Peterse authored
This changes various controllers to use the new EventCollection class for retrieving events. This class uses a JOIN LATERAL query on PostgreSQL to retrieve queries in a more efficient way, while falling back to a simpler / less efficient query for MySQL. The EventCollection class also includes a limit on the number of events to display to prevent malicious users from cycling through all events, as doing so could put a lot of pressure on the database. JOIN LATERAL is only supported on PostgreSQL starting with version 9.3.0 and as such this optimisation is only used when using PostgreSQL 9.3 or newer.
-
- Aug 07, 2017
-
-
Yorick Peterse authored
This solves an N+1 query problem where for every project we'd query the creator separately just to figure out what avatar to display.
-
- Jun 21, 2017
-
-
Grzegorz Bizon authored
-
- Jun 12, 2017
-
-
Tieu-Philippe KHIM authored
-
- May 25, 2017
-
-
Douwe Maan authored
-
- Apr 06, 2017
-
-
Jacopo authored
Extended ProjectFinder in order to handle the following options: - current_user - which user use - project_ids_relation: int[] - project ids to use - params: - trending: boolean - non_public: boolean - starred: boolean - sort: string - visibility_level: int - tags: string[] - personal: boolean - search: string - non_archived: boolean GroupProjectsFinder now inherits from ProjectsFinder. Changed the code in order to use the new available options.
-
- Mar 16, 2017
-
-
Bob Van Landuyt :neckbeard: authored
-
- Feb 13, 2017
-
-
Rémy Coutable authored
Also, don't use limit in subquery, MySQL don't like that. Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Feb 03, 2017
-
-
Oswaldo Ferreir authored
-
- Jun 03, 2016
-
-
James Lopez authored
This reverts commit 3e991230.
-
James Lopez authored
# Conflicts: # app/models/project.rb
-
- May 10, 2016
-
-
Sean McGivern authored
`User#starred_projects` doesn't perform any visibility checks. This has a couple of problems: 1. It assumes a user can always view all of their starred projects in perpetuity (project not changed to private, access revoked, etc.). 2. It assumes that we'll only ever allow a user to star a project they can view. This is currently the case, but bugs happen. Add `User#viewable_starred_projects` to filter the starred projects by those the user either has explicit access to, or are public or internal. Then use that in all places where we list the user's starred projects.
-
- Mar 19, 2016
-
-
Robert Speicher authored
-
- Mar 10, 2016
-
-
Josh Frye authored
-
- Mar 04, 2016
-
-
Dmitriy Zaporozhets authored
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- Mar 03, 2016
-
-
Dmitriy Zaporozhets authored
This reverts commit 617bb109.
-
Dmitriy Zaporozhets authored
This reverts commit 70d64552.
-
Dmitriy Zaporozhets authored
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- Mar 02, 2016
-
-
Rémy Coutable authored
-
- Feb 09, 2016
-
-
Josh Frye authored
-