Commit Graph

81 Commits

Author SHA1 Message Date
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
Oswaldo Ferreira fd32960e7c Separate CE params on Grape API 2017-04-10 16:13:48 -03:00
blackst0ne 11aff97d88 Remove the User#is_admin? method 2017-04-09 13:20:57 +11:00
Jacopo b996a82ff4 ProjectsFinder should handle more options
Extended ProjectFinder in order to handle the following options:
 - current_user - which user use
 - project_ids_relation: int[] - project ids to use
 - params:
   -  trending: boolean
   -  non_public: boolean
   -  starred: boolean
   -  sort: string
   -  visibility_level: int
   -  tags: string[]
   -  personal: boolean
   -  search: string
   -  non_archived: boolean

GroupProjectsFinder now inherits from ProjectsFinder.
Changed the code in order to use the new available options.
2017-04-06 07:11:37 +02:00
Rémy Coutable 63360adeae
Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-16 18:00:24 +01:00
Toon Claes f45cbc8701 Expose Group VisibilityLevel as String
Instead of exposing the VisibilityLevel as Integer, expose it as
String `visibility`.
2017-03-02 12:15:24 +01:00
Robert Schilling 1615003665 API: Use parameter to get owned groups instead of dedicated endpoint 2017-02-24 10:31:41 +01:00
Toon Claes 4e9e29d295 API: Consolidate /projects endpoint
It consolidates these endpoints:
 - /projects
 - /projects/owned
 - /projects/visible
 - /projects/starred
 - /projects/all

Into the /projects endpoint using query parameters.
2017-02-14 16:41:57 +01:00
Dmitriy Zaporozhets 3d20670058 Merge branch 'dz-nested-groups-api' into 'master'
Nested groups API

See merge request !9034
2017-02-09 08:31:43 +00:00
Dmitriy Zaporozhets df974814fb
Add nested groups to the API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-08 12:42:34 +02:00
dixpac 0dacf3c169 Fix inconsistent naming for services that delete things
* Changed name of delete_user_service and worker to destroy
* Move and change delete_group_service to Groups::DestroyService
* Rename Notes::DeleteService to Notes::DestroyService
2017-02-08 09:16:43 +01:00
Mark Fletcher b5f4fc843a Fix groups API to accept path when transferring a project
* Use standard helpers for finding group and project
2017-01-03 09:25:56 +00:00
Markus Koller 3ef4f74b1a
Add more storage statistics
This adds counters for build artifacts and LFS objects, and moves
the preexisting repository_size and commit_count from the projects
table into a new project_statistics table.

The counters are displayed in the administration area for projects
and groups, and also available through the API for admins (on */all)
and normal users (on */owned)

The statistics are updated through ProjectCacheWorker, which can now
do more granular updates with the new :statistics argument.
2016-12-21 16:39:49 +01:00
Markus Koller d5c4977912
Consistently use current_user in API entities 2016-12-21 16:36:53 +01:00
Robert Schilling 7841be243e API: Ability to get group's project in simple representation 2016-12-13 13:54:36 +01:00
Robert Schilling 81a12c10fe API: Fix groups filter 2016-12-12 13:46:54 +01:00
Robert Schilling 74c8669b0a Use the pagination helper in the API 2016-12-04 18:11:19 +01:00
Yorick Peterse 838c1aad68 Merge branch '22373-reduce-queries-in-api-helpers-find_project' into 'master'
Resolve "Reduce queries in API::Helpers#find_project"

See merge request !7714
2016-11-25 12:17:23 +00:00
Rémy Coutable 81ba3f9177
API: Introduce `#find_group!` which also check access permission
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 16:58:32 +01:00
Robert Schilling 9dfbfbb2d1 Don't convert data which already is the target type 2016-11-24 13:35:26 +01:00
Sean McGivern 7912289631 Allow sorting groups in API
Allow `order_by` and `sort` parameters to `/api/v3/groups.json`. At
present, only ordering by name and path is supported, and the default
sort is name ascending (alphabetical order).
2016-11-17 18:37:52 +00:00
Robert Schilling ac12c1d271 Grapify the group API 2016-11-15 14:36:42 +01:00
Borja Aparicio 4f2c441161 Added API endpoint groups/owned 2016-11-08 10:55:35 +01:00
Rémy Coutable e5c6f943fe
Backport Group API code that was added in EE only
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-31 18:47:30 +01:00
barthc 35ced4dae4 fix group links 404 2016-10-05 09:57:54 +01:00
Felipe Artur e0067d1850 Allow to set request_access_enabled for groups and projects using API 2016-09-19 12:13:57 -03:00
Patricio Cano fd62142950 Added group-specific setting for LFS.
Groups can enable/disable LFS, but this setting can be overridden at the project level. Admin only
2016-09-15 12:27:32 -05:00
Felipe Artur 892dea6771 Project tools visibility level 2016-09-01 11:47:59 -03:00
http://jneen.net/ 2bdcef4d67 use a nil subject when we want to check global abilities 2016-08-30 11:39:22 -07:00
Stan Hu b359d5d57f Fix groups API to list only user's accessible projects
Closes #17496
2016-05-24 18:14:12 -07:00
Robert Schilling 5fb572417e Fix minor issues according development guidelines 2016-04-12 19:08:35 +02:00