Commit graph

13 commits

Author SHA1 Message Date
Dennis Tang
5b74a1aebc Resolve "Improve handling of projects shared with a group" 2018-09-07 06:09:13 +00:00
Bob Van Landuyt
2a9a2b22e6 Revert "Don't include projects shared as group-descendants"
This reverts commit 2c3c5b3554.

Revisit this after https://gitlab.com/gitlab-org/gitlab-ce/issues/45441
2018-04-18 17:15:52 +02:00
Bob Van Landuyt
26c4e47a0d Preload ancestors for subgroups matching filter
Otherwise we'd only preload the ancestors that would fit the
page. That way, when a search result was on the first page, but the
ancestor didn't fit the page anymore. We would not have the preloaded
ancestor when rendering the hierarchy.
2018-01-22 17:02:04 +01:00
Bob Van Landuyt
2c3c5b3554 Don't include projects shared as group-descendants
When a project is shared with a group, it should not be included as a
descendant on the group dashboard.
2018-01-22 17:02:04 +01:00
Mark Fletcher
e7deeddc1b Enable sorting by name in the Groups dropdown 2017-12-20 19:34:50 +00:00
Bob Van Landuyt
5a903149e7 Handle archived projects in the GroupDescendantsFinder 2017-10-11 10:17:24 +02:00
Bob Van Landuyt
aee5691db3 Don't load unneeded elements in GroupsController#show 2017-10-10 16:54:28 +02:00
Bob Van Landuyt
deb45634ae Use EXISTS instead of WHERE id IN (...) for authorized groups 2017-10-10 14:09:56 +02:00
Bob Van Landuyt
951abe2b2e Load counts everywhere we render a group tree 2017-10-05 11:11:21 +02:00
Bob Van Landuyt
7a3ba8e984 Make sure the user only sees groups he's allowed to see 2017-10-04 22:49:42 +02:00
Bob Van Landuyt
ac0b104ae4 Minimize the number of queries by preloading counts and ancestors
By preloading the count of members, projects and subgroups of a group,
we don't need to query them later.

We also preload the entire hierarchy for a search result and include
the counts so we don't need to query for them again
2017-10-04 22:49:42 +02:00
Bob Van Landuyt
e13753fcaa Only take unarchived projects into account
When finding children for a group
2017-10-04 22:49:41 +02:00
Bob Van Landuyt
22aa034427 Rename GroupHierarchy to GroupDescendant 2017-10-04 22:49:41 +02:00
Renamed from spec/finders/group_children_finder_spec.rb (Browse further)