Commit Graph

111 Commits

Author SHA1 Message Date
Felipe Artur 13fc0efa57 Let project reporters create issue from group boards
The current state of group issue boards does not show the "Add issues"
button on the UI for users that are reporters of group child projects.
2019-09-04 16:33:02 +00:00
Victor Zagorodny e4fbd94cf5 Update CE files for GSD projects filter
A new param with_security_reports was added to
GET /groups/:id/projects API and the code to
support this logic in GroupProjectsFinder and
Project model. Also, a DB index was added to
ci_job_artifacts table to speed up the search
of security reports artifacts for projects
2019-08-28 14:26:42 +00:00
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
Imre Farkas a5488e452e CE-port of Refactor EE specific params override in API::Groups 2019-05-27 12:37:53 +00:00
Imre Farkas 0313795072 CE port of Move EE specific lines in API::Groups 2019-05-20 17:02:06 +00:00
Rubén Dávila e8da6255d9 Backport some changes from EE
MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9815
2019-04-02 23:20:43 -05:00
Yorick Peterse c3b24826d1
Backport EE API parameters for API::Groups
This backports the API parameters for API::Groups from EE to CE,
ensuring both implementations use the same code. EE specific parameters
are wrapped in an `if` statement for two reasons:

1. It allows us to completely disable the parameters in CE.

2. It removes the need for adding a source comment to signal that the
   parameters are EE only.
2019-03-26 14:18:28 +01:00
Yorick Peterse 88abe1ec55
Use a method for updating groups in the API
Similar to creating groups in the groups API, EE injects custom code
just before we update an existing group. Moving the update logic to a
separate method in CE allows EE to more easily extend it.
2019-03-04 17:44:56 +01:00
Yorick Peterse 890ffac61b
Use a method for creating groups in the API
EE has some custom behaviour that needs to run before and after creating
a group in the API. By moving the group creation logic to a separate
method, EE can easily extend this behaviour; without having to directly
modify the API source code.
2019-03-04 17:44:56 +01:00
Jarka Košanová b1c3955385 Rename GroupHierarchy into ObjectHierarchy
- we now use the hierarchy class also for epics
- also rename supports_nested_groups? into supports_nested_objects?
  - move it to a concern
2018-12-19 15:24:29 +01:00
Imre Farkas b1e070bf49
Fix API::Namespaces to accept namepaces with dots
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
2018-11-28 12:54:11 +01:00
Heinrich Lee Yu b12456049e Change param name for consistency 2018-11-19 23:59:54 +08:00
Heinrich Lee Yu 2ec2a906b5 Add group projects API options for including shared and subgroups 2018-11-19 23:59:54 +08:00
gfyoung 3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Marko, Peter 9cdf4292c5 Add min_access_level filter to groups API
Signed-off-by: Marko, Peter <peter.marko@siemens.com>
2018-07-23 20:57:50 +02:00
Tiago Botelho e6f3452314 Adds with_projects optional parameter to /groups/:id API endpoint 2018-07-09 16:28:17 +01:00
Jan Beckmann 352e322291 Resolve "404 when trying to create a new issue from the group" 2018-07-02 08:04:43 +00:00
Marko, Peter 24865a4e17 Add id as second sort parameter for group sort by name
Adding primary key to database query order rule
generates deterministic sort result and thus pagination.
This is needed because subgroups can have identical names.

Signed-off-by: Marko, Peter <peter.marko@siemens.com>
2018-06-18 19:30:34 +02:00
Marko, Peter 79033a5f67 Add id group api sorting option
With introduction of subgroups, many groups may have the same
name and/or path, thus further sorting options are necessary.

Signed-off-by: Marko, Peter <peter.marko@siemens.com>
2018-06-12 08:16:01 +02:00
Stan Hu 6c190d273d Move API group deletion to Sidekiq 2018-05-18 01:05:11 +00:00
Jan Provaznik 2060533f91 Whitelisted query limits for group destroy API 2018-05-16 08:58:07 +02:00
Roger Rüttimann bc7877e8c1 show only groups an admin is a member of in dashboards/grops 2018-05-01 09:24:21 +00:00
Markus Koller b7cd99c376
Allow including custom attributes in API responses 2018-02-08 13:30:34 +01:00
Francisco Lopez 58c5b463ff Refactored /projects and /user/:user_id/projects endpoints 2017-12-01 18:32:12 +01:00
Francisco Lopez c85f9c5b1d Code review comments applied 2017-12-01 18:32:12 +01:00
Francisco Lopez 7c7877b54d Small renaming 2017-12-01 18:32:12 +01:00
Francisco Lopez a2babf32fe More preloading improvement and added batch count services 2017-12-01 18:32:12 +01:00
Stan Hu 0dfb880101 Preload project route to avoid N+1 query 2017-12-01 18:32:12 +01:00
Stan Hu 88e3ce30ae Optimize API /groups/:id/projects by preloading associations
Closes #40308
2017-12-01 18:32:12 +01:00
Winnie Hellmann 26b6dfaf6f Add /groups/:id/subgroups endpoint to API 2017-11-09 16:07:04 +00:00
Markus Koller 1f773a8ef5
Support custom attributes on groups 2017-11-06 10:51:50 +01: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 Schilling 6a2ee0968e API: Use defined project requirements 2017-08-31 14:57:47 +02:00
Sean McGivern 2f1ef2be6f Merge branch '37198-api-doesn-t-respect-default-group-visibility' into 'master'
Respect the default visibility level when creating a group via the API

Closes #37198

See merge request !13903
2017-08-30 10:04:00 +00:00
Robert Schilling 9edaff0d35 Make rubocop happy 2017-08-30 10:11:24 +02:00
Robert Schilling 67c042e4a5 Respect the default visibility level when creating a group 2017-08-29 16:49:43 +02:00
Robert Schilling e80313f9ee Conditionally destroy a ressource 2017-08-28 16:40:25 +02:00
Robert Schilling 998afa5f74 API: Respect the 'If-Unmodified-Since' for delete endpoints 2017-08-28 16:40:25 +02:00
Nick Thomas 2adff699ce Refactor complicated API group finding rules into GroupsFinder 2017-08-24 11:33:09 +01:00
Nick Thomas 502d6464b0 Allow v4 API GET requests for groups to be unauthenticated 2017-08-23 18:30:53 +01:00
Dmitriy Zaporozhets 6b8ad689da
Update grape gem
New version of the gem returns 200 status code on delete with content
instead of 204 so we explicitly set status code to keep existing
behavior

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-07-20 16:33:18 +03:00
Lin Jen-Shin d919f924bf Backport https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1942 2017-06-06 21:42:45 +08:00
Toon Claes db679788e4 Add :owned param to ProjectFinder
And use it in the API.
2017-05-30 22:45:59 +02:00
Toon Claes 0f0b9a8466 Use helper to construct Finder params
The ProjectsFinder and GroupFinder both support the same set of params. And the
`/api/v4/projects` and `/api/v4/group/:id/projects` also support the same set of
params. But they do not match the Finder params. So use a helper method to
transform them.
2017-05-30 22:45:59 +02: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
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
Oswaldo Ferreira ce4a50fcfb Add share_with_group_lock to CE optional params block 2017-04-10 16:22:48 -03:00