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
Robert Schilling
d0cdc2ee73
API: Ability to update a group
2016-04-12 15:47:20 +02:00
Douwe Maan
8db1292139
Tweaks, refactoring, and specs
2016-03-20 21:04:07 +01:00
Douwe Maan
8f817c7b08
Add API group projects endpoint.
2015-12-07 17:10:40 +01:00
Douwe Maan
b93053695a
Fix transferring of project to another group using the API.
2015-07-11 16:47:33 -04:00
Dmitriy Zaporozhets
61cfd1d273
Wrap group removal into service
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 14:07:20 +02:00
Dmitriy Zaporozhets
a7ddff8748
Merge pull request #9066 from jirutka/fix-6417
...
Fix #6417 : users with group permission should be able to create groups via API
2015-05-03 14:31:00 +03:00
Douwe Maan
ff3caad4ca
Rename manage_group ability to admin_group for consistency with project.
2015-04-14 12:05:49 +02:00
Robert Schilling
9769c2d7fd
Fix #6417 : users with group permission should be able to create groups via API
2015-03-31 18:32:24 +02:00
Dmitriy Zaporozhets
24d939afb9
Remove Group#owner_id from API since it is not used any more
2015-02-17 16:23:44 -08:00
jubianchi
4e97f26649
Acces groups with their path in API
2015-02-03 13:42:38 +01:00
Daniel Serodio
6ac8bb0f7c
Add description attribute to group API (GET and POST)
2015-01-16 16:52:48 -02:00
Marin Jankovski
cd0aed3d54
Add a message when unable to save an object through api.
2015-01-07 10:46:00 +01:00
Marin Jankovski
ed464edabe
Message for api files and groups.
2014-12-30 14:29:55 +01:00