Commit Graph

69 Commits

Author SHA1 Message Date
Heinrich Lee Yu 1ce5bcacdb Remove code related to object hierarchy in MySQL
These are not required because MySQL is not
supported anymore
2019-07-25 15:35:06 +08:00
Fabian Schneider b5952294ce Revert "Include subgroups in shared_projects"
This reverts commit 4bed2daef935bb4097988e0eff4830fc13a23c37.
2019-07-01 11:17:47 +00:00
Małgorzata Ksionek b9cb49ad45 Move specs to ce directory 2019-06-03 09:32:12 +02:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Gosia Ksionek 64858317ad Add part of needed code
Add columns to store project creation settings

Add project creation level column in groups
 and default project creation column in application settings

Remove obsolete line from schema

Update migration with project_creation_level column existence check

Rename migrations to avoid conflicts

Update migration methods

Update migration method
2019-04-05 18:49:46 +00:00
Andreas Brandl 46b1b9c1d6 Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
2019-04-05 13:02:56 +00:00
Imre Farkas d9d7237d2e Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-05 11:45:47 +00:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Illya Klymov ffbc66cc0b Redirect to edit page on group transfer failure 2019-04-03 11:29:35 +03:00
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