- 30 Aug, 2017 1 commit
-
-
Yorick Peterse authored
This ensures the issues/MR cache of the sidebar is only updated when the state or confidential flags changes, instead of changing this for every update.
-
- 23 Aug, 2017 1 commit
-
-
Yorick Peterse authored
Every project page displays a navigation menu that in turn displays the number of open issues and merge requests. This means that for every project page we run two COUNT(*) queries, each taking up roughly 30 milliseconds on GitLab.com. By caching these numbers and refreshing them whenever necessary we can reduce loading times of all these pages by up to roughly 60 milliseconds. The number of open issues does not include confidential issues. This is a trade-off to keep the code simple and to ensure refreshing the data only needs 2 COUNT(*) queries instead of 3. A downside is that if a project only has 5 confidential issues the counter will be set to 0. Because we now have 3 similar counting service classes the code previously used in Projects::ForksCountService has mostly been moved to Projects::CountService, which in turn is reused by the various service classes. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36622
-
- 11 Aug, 2017 1 commit
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 09 Aug, 2017 1 commit
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 07 Aug, 2017 1 commit
-
-
Jarka Kadlecova authored
-
- 02 Aug, 2017 1 commit
-
-
Robert Speicher authored
-
- 01 Aug, 2017 1 commit
-
-
Robert Speicher authored
-
- 27 Jul, 2017 1 commit
-
-
Rémy Coutable authored
Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 21 Jun, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 14 Jun, 2017 1 commit
-
-
Robert Speicher authored
-
- 12 May, 2017 1 commit
-
-
Valery Sizov authored
-
- 04 May, 2017 2 commits
-
-
Valery Sizov authored
-
Alfredo Sumaran authored
-
- 20 Apr, 2017 1 commit
-
-
Valery Sizov authored
-
- 10 Apr, 2017 1 commit
-
-
Robert Speicher authored
-
- 04 Apr, 2017 1 commit
-
-
Felipe Artur authored
-
- 21 Mar, 2017 1 commit
-
-
Oswaldo Ferreira authored
-
- 17 Mar, 2017 1 commit
-
-
Felipe Artur authored
-
- 14 Mar, 2017 2 commits
-
-
Ruben Davila authored
-
Valery Sizov authored
-
- 23 Feb, 2017 2 commits
-
-
Douwe Maan authored
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
-
Douwe Maan authored
-
- 27 Jan, 2017 3 commits
-
-
Oswaldo Ferreira authored
-
Berna Castro authored
Refactor overall code and fix failing specs Fix Project#to_reference Fix wrong spaces and update changelog Refactor #to_reference for Project & Issue Fix and improves Project#to_reference
-
Berna Castro authored
-
- 26 Jan, 2017 1 commit
-
-
Robert Speicher authored
-
- 25 Jan, 2017 1 commit
-
-
Robert Speicher authored
-
- 03 Jan, 2017 1 commit
-
-
James Lopez authored
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
-
- 15 Dec, 2016 1 commit
-
-
Sean McGivern authored
Issue#visible_to_user moved to IssuesFinder Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24637. See merge request !2039
-
- 02 Dec, 2016 1 commit
-
-
Oswaldo Ferreira authored
-
- 23 Nov, 2016 1 commit
-
-
Ahmad Sherif authored
Closes #23938
-
- 09 Nov, 2016 1 commit
-
-
Douwe Maan authored
disable markdown in comments when referencing disabled features fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23548 This MR prevents the following references when tool is disabled: - issues - snippets - commits - when repo is disabled - commit range - when repo is disabled - milestones This MR does not prevent references to repository files, since they are just markdown links and don't leak information. See merge request !2011 Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 20 Oct, 2016 1 commit
-
-
Paco Guzman authored
-
- 28 Sep, 2016 1 commit
-
-
Rémy Coutable authored
Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 29 Jul, 2016 1 commit
-
-
Yorick Peterse authored
The method Ability.issues_readable_by_user takes a list of users and an optional user and returns an Array of issues readable by said user. This method in turn is used by Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this method no longer needs to get all the available abilities just to check if a user has the "read_issue" ability. To test this I benchmarked an issue with 222 comments on my development environment. Using these changes the time spent in nodes_visible_to_user was reduced from around 120 ms to around 40 ms.
-
- 20 Jul, 2016 1 commit
-
-
Alejandro Rodríguez authored
Currently, even when searching for all authorized issues of *one* project, we run the `Users#authorized_projects` query (which can be rather slow). This update checks if we are handling issues of just one project and does the authorization check locally. It does have the downside of basically repeating the logic of `Users#authorized_projects` on `Project#authorized_for_user`.
-
- 03 Jun, 2016 2 commits
-
-
James Lopez authored
This reverts commit 3e991230.
-
James Lopez authored
# Conflicts: # app/models/project.rb
-
- 02 Jun, 2016 1 commit
-
-
Josh Frye authored
-
- 01 Jun, 2016 1 commit
-
-
Yorick Peterse authored
There are several changes to this module: 1. The use of an explicit stack in Participable#participants 2. Proc behaviour has been changed 3. Batch permissions checking == Explicit Stack Participable#participants no longer uses recursion to process "self" and all child objects, instead it uses an Array and processes objects in breadth-first order. This allows us to for example create a single Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using a ReferenceExtractor removes the need for running potentially many SQL queries every time a Proc is called on a new object. == Proc Behaviour Changed Previously a Proc in Participable was expected to return an Array of User instances. This has been changed and instead it's now expected that a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return value of the Proc is ignored. == Permissions Checking The method Participable#participants uses Ability.users_that_can_read_project to check if the returned users have access to the project of "self" _without_ running multiple SQL queries for every user.
-