Commit Graph

59 Commits

Author SHA1 Message Date
Gilbert Roulot 6ab102a2f8 Security Dashboard as default view for groups
Add a supporting code to separate groups#show
and groups#details which is required for the
proper implementation of the Group Overview
content and Security Dashboard option for it
2019-03-14 12:55:46 +00:00
Mario de la Ossa 39afba0659
Always use CTE for IssuableFinder counts
Since the CTE is faster than a subquery and the only reason we're using
a subquery is that the CTE can't handle sorting by certain attributes,
let's use the CTE always (when the feature flag is enabled) when
counting, since we can ignore ordering if we just want a count of
results.
2019-02-28 11:25:57 -06:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Sean McGivern 7fd5dbf9db Add a flag to use a subquery for group issues search
We already had a flag to use a CTE, but this broke searching in some
cases where we need to sort by a joined table. Disabling the CTE flag
makes searches much slower.

The new flag, to use a subquery, makes them slightly slower than the
CTE, while maintaining correctness. If both it and the CTE flag are
enabled, the subquery takes precedence.
2018-11-30 11:57:56 +00:00
Cindy Pallares fe5f75930e
Merge branch 'security-fix-pat-web-access' into 'master'
[master] Resolve "Personal access token with only `read_user` scope can be used to authenticate any web request"

See merge request gitlab/gitlabhq!2583
2018-11-28 19:13:59 -05:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Sean McGivern 456ed01d3e Put issues group search CTE behind a (default on) flag
We don't think this is needed any more - see
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21521, and
https://gitlab.com/gitlab-org/gitlab-ce/issues/52271 for removing the flag.
2018-10-05 11:46:54 +01:00
Sean McGivern b480d7121f Add spec for group issues search + sorting 2018-10-05 11:25:11 +01:00
Dennis Tang 5b74a1aebc Resolve "Improve handling of projects shared with a group" 2018-09-07 06:09:13 +00:00
Winnie Hellmann 743add978a Move badge settings to general settings 2018-09-03 13:16:23 +00:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Mayra Cabrera 68a419c879 31885 - Ability to transfer a single group to another group 2018-02-06 00:10:58 +00:00
Stan Hu 30e6cfa05a Fix not all events being shown in group dashboard
The group activity feed was limited to the first 20 projects found
in the group, which caused activity from some projects to be omitted.
A limit of 20 is applied to the query for events, so the
extra pagination does little in the way of performance.

Closes #42560
2018-01-30 17:04:22 -08:00
Rémy Coutable d5e2f873db Merge branch '35644-refactor-have-http-status-into-have-gitlab-http-status' into 'master'
Refactor `have_http_status` into `have_gitlab_http_status` in the specs

Closes #35644

See merge request gitlab-org/gitlab-ce!14958
2017-10-23 14:55:57 +00:00
Bob Van Landuyt 69eba88532 Make sure we render events for projects within a group 2017-10-20 17:02:02 +03:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Bob Van Landuyt 2c25a7ae34 Nest the group_children_path inside the canonical group path 2017-10-12 11:36:55 +02:00
Bob Van Landuyt bd8943f5ad Fix spinach features
And several other failures
2017-10-11 14:16:40 +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 67815272dc Return an empty array when no matches are found 2017-10-04 22:49:42 +02:00
Bob Van Landuyt 8a685ca856 Fix bug with project pagination
When projects were listed after groups, the projects that would also
have been listed on the last page containing groups would be repeated.
2017-10-04 22:49:42 +02:00
Bob Van Landuyt af0b8e0558 Only preload ancestors for search results in the specified parent
When filtering we want all to preload all the ancestors upto the specified
parent group.

- root
  - subgroup
    - nested-group
      - project

So when searching 'project', on the 'subgroup' page we want to preload
'nested-group' but not 'subgroup' or 'root'
2017-10-04 22:49:42 +02:00
Bob Van Landuyt ab5d5b7ece Make sure all queries are limited to the page size
And fix some pagination bugs
2017-10-04 22:49:42 +02:00
Bob Van Landuyt b92e7103fc Fix nesting bug when rendering children of a shared subgroup 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 29df1ce841 Improve number of queries
And document what extra queries are still being performed.
2017-10-04 22:49:41 +02:00
Bob Van Landuyt 9781ac552d Include pagination when rendering expanded hierarchies 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 20a08965bc [WIP] improve number of queries when rendering a hierarchy 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 3a4dc55f29 Reuse the groups tree for explore and dashboard. 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 79cc3c8e3e Limit the amount of queries per row 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 8f6dac4991 Allow filtering children for a group
When fetching children for a group with a filter, we will search all
nested groups for results and render them in an expanded tree
2017-10-04 22:49:41 +02:00
Bob Van Landuyt 28c440045e Add pagination for children 2017-10-04 22:46:49 +02:00
Bob Van Landuyt 80780018a9 Update `children` route to handle projects and groups 2017-10-04 22:46:49 +02:00
Bob Van Landuyt 376a8c66c1 Remove the subgroups path on a group 2017-10-04 22:46:49 +02:00
Ruben Davila 62bb6235c2 Make Members with Owner and Master roles always able to create subgroups 2017-09-07 13:47:58 -05:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Toon Claes ef1811f4bc Subgroups page should show groups authorized through inheritance
When a user is authorized to a group, they are also authorized to see all the
ancestor groups and descendant groups.

When a user is authorized to a project, they are authorized to see all the
ancestor groups too.

Closes #32135

See merge request !11764
2017-06-15 08:46:34 +02:00
Douwe Maan 26bcef97d6 Merge branch 'rework-authorizations-performance' into 'master'
Rework project authorizations and nested groups for better performance

See merge request !10885
2017-05-29 15:49:56 +00:00
Michael Kozono 49697bc8df Refactor to more robust implementation
In order to avoid string manipulation or modify route params (to make them unambiguous for `url_for`), we are accepting a behavior change:

When being redirected to the canonical path for a group, if you requested a group show path starting with `/groups/…` then you’ll now be redirected to the group at root `/…`.
2017-05-19 09:13:27 -07:00
Michael Kozono f9785dcec3 Fix ensure_canonical_path for top level routes
Don’t replace a substring of the path if it is part of the top level route.

E.g. When redirecting from `/groups/ups` to `/groups/foo`, be careful not to do `/grofoo/ups`.

Projects are unaffected by this issue, but I am grouping the `#ensure_canonical_path` tests similar to the group and user tests.
2017-05-18 16:24:10 -07:00
Michael Kozono 11f82de1ef Add test that fails without the fix 2017-05-18 10:30:17 -07:00
Yorick Peterse 34974258bc
Hide nested group UI/API support for MySQL
This hides/disables some UI elements and API parameters related to
nested groups when MySQL is used, since nested groups are not supported
for MySQL.
2017-05-17 20:53:16 +02:00
Michael Kozono ab98f8b5b1 Fix redirect message for groups and users 2017-05-11 15:28:13 -07:00
Robert Speicher cb2f739d48 Merge branch '27144-enforce-rubocop-trailing_commas-no_comma-style' into 'master'
Resolve "Use consistent style for trailing commas"

Closes #27144

See merge request !11063
2017-05-10 21:43:34 +00:00
Rémy Coutable 3db37e0562 Enable the Style/TrailingCommaInArguments cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Douwe Maan ea4eb46047 Merge branch 'tc-fix-private-subgroups-shown' into 'security'
Use GroupsFinder to find subgroups the user has access to

See merge request !2096
2017-05-10 16:48:18 +02:00
Michael Kozono f05469f99b Resolve discussions 2017-05-05 12:12:50 -07:00
Michael Kozono e4bcc90d95 Add “project moved” flash message on redirect 2017-05-05 12:12:50 -07:00
Michael Kozono fc061c2ecd Fix Rubocop failures 2017-05-05 12:12:49 -07:00
Michael Kozono 7d02bcd2e0 Redirect from redirect routes to canonical routes 2017-05-05 12:11:57 -07:00