Commit Graph

200 Commits

Author SHA1 Message Date
Robert Speicher 55b3ee7439 Merge branch 'sandish/gitlab-ce-update_ret_val' into 'master'
Ensure updating project settings shows a flash message on success

See merge request !8579
2017-01-16 18:28:23 +00:00
Rémy Coutable 7485cec94e
Add a spec and actually display the flash notice
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-16 10:57:15 -05:00
Rémy Coutable 281f3fcfd5 Merge branch 'dot-in-project-queries' into 'master'
Add a constraint on the query parameter to allow querying for projects with dots in their name.

See merge request !8210
2017-01-16 00:03:01 +00:00
Bruno Melli 322534aa94 Add a constraint on the query parameter to allow querying for projects with dots in their name. 2017-01-14 23:13:39 -07: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
Rémy Coutable d757247247
Allow public access to some Project API endpoints
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-01 16:39:42 +01:00
Robert Schilling 7c607a55ab Grapify the projects API 2016-11-28 21:01:43 +01:00
Rémy Coutable 4f5ed81232
API: Introduce `#find_project!` which also check access permission
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 14:40:35 +01:00
Robert Schilling eff1b05ab1 API: Add endpoint to delete a group share 2016-11-23 12:53:37 +01:00
Rodolfo Santos 1db9f826c1 Add setting to only allow merge requests to be merged when all discussions are resolved
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-04 14:58:40 +01:00
Rémy Coutable 670b2eb5c0
Merge branch 'api-fix-project-group-sharing' into 'security'
API: Share projects only with groups current_user can access

Aims to address the issues here: https://gitlab.com/gitlab-org/gitlab-ce/issues/23004

* Projects can be shared with non-existent groups
* Projects can be shared with groups that the current user does not have access to read

Concerns:

The new implementation of the API endpoint allows projects to be shared with a larger range of groups than can be done via the web UI.

The form for sharing a project with a group uses the following API endpoint to index the available groups: 494269fc92/lib/api/groups.rb (L17). The groups indexed in the web form will only be those groups that the user is currently a member of.

The new implementation allows projects to be shared with any group that the authenticated user has access to view. This widens the range of groups to those that are public and internal.

See merge request !2005

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-11 20:36:26 +02:00
Sean McGivern 0a1baaa80f Tidy up project list actions 2016-10-05 12:13:58 +01:00
Ben Boeckel e956a24dfd api: add /projects/visible API endpoint
FIxes #19361, #3119.
2016-10-04 17:23:18 +01:00
Felipe Artur 93d849beae Expose project share expiration_date field on API 2016-09-28 10:12:49 -03:00
Rémy Coutable 7458126111 API: Return 404 when trying to fork to unaccessible namespace
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22 12:15:45 +02:00
Felipe Artur e0067d1850 Allow to set request_access_enabled for groups and projects using API 2016-09-19 12:13:57 -03:00
Rémy Coutable 3a58dd2d8f
Use Search::GlobalService.new in the `GET /projects/search/:query` endpoint
Also streamline the sorting part while we're at it.

That being done, there's currently a duplication between
`GET /projects/search/:query` and `GET /projects?search=:search`
so we might want to keep only the latter for 9.0...

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-12 10:34:03 +02:00
Razzeee 874ad681cd Search should compare only the lowercase versions of the project names 2016-09-09 15:19:18 +02:00
Olaf Tomalka 636db1515c Higher code quality for fork to namespace API 2016-09-06 23:51:08 +02:00
Olaf Tomalka 3aa40153e0 Improved code quality on API fork namespace feature 2016-09-06 10:52:42 +02:00
Olaf Tomalka bad3fb895c Added fork API paremeter for a specific namespace
Browser interface allows forking to an owned grup.
This commit brings API up to speed by providing optional namespace
parameter to fork API. This allows forking to users and groups under
forker's control using their id or unique name.

Fixes #21591
2016-09-06 04:16:14 +02:00
Felipe Artur 892dea6771 Project tools visibility level 2016-09-01 11:47:59 -03:00
Patricio Cano cf37d623e1 Renamed `enable_lfs` to `lfs_enabled` for the Project field, and related fixes. 2016-08-30 17:17:45 -05:00
Patricio Cano 0227e98d0d Added CHANGELOG, documentation, and API functionality 2016-08-30 16:17:41 -05:00
Marc Dequènes (Duck) 31b2c1ef88 expose 'only_allow_merge_if_build_succeeds' project setting in the API 2016-08-24 17:11:48 +09:00
Stan Hu 4955a47cb1 Clean up project destruction
Instead of redirecting from the project service to the service and back to the model,
put all destruction code in the service. Also removes a possible source of failure
where run_after_commit may not destroy the project.
2016-08-10 09:28:21 -07:00
Robert Schilling 839aec1a61 Replace parse_boolean with to_boolean 2016-07-20 08:55:44 +02:00
tiagonbotelho 563b303bde removes basicprojectwithaccess and replaces it with basicprojectdetails 2016-07-12 17:32:40 +01:00
tiagonbotelho 8d9e649c24 changes the usage of simpleprojectdetails to already implemented basicprojectsdetails and changes the url to a more reader friendly format 2016-07-12 16:40:49 +01:00
tiagonbotelho 2179c4052e adds basic functionality to the new endpoint of the api 2016-07-12 16:39:25 +01:00
tiagonbotelho be3409ab7a changes string to symbol in param 2016-07-12 16:36:42 +01:00
tiagonbotelho c4dc0f52c3 adds test to check json fields on simple request and changes the url request format 2016-07-12 16:36:42 +01:00
tiagonbotelho f5d92d120e changes the usage of simpleprojectdetails to already implemented basicprojectsdetails and changes the url to a more reader friendly format 2016-07-12 16:36:42 +01:00
tiagonbotelho a8cf4e13b3 adds basic functionality to the new endpoint of the api 2016-07-12 16:36:42 +01:00
tiagonbotelho e1c5eb480e implements filter_params 2016-07-12 16:36:42 +01:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Kamil Trzcinski 0958f331d1 Merge remote-tracking branch 'origin/master' into docker-registry
# Conflicts:
#	config/initializers/1_settings.rb
2016-05-13 17:14:46 -05:00
Sean McGivern 97424ea544 Restrict starred projects to viewable ones
`User#starred_projects` doesn't perform any visibility checks. This has
a couple of problems:

1. It assumes a user can always view all of their starred projects in
   perpetuity (project not changed to private, access revoked, etc.).
2. It assumes that we'll only ever allow a user to star a project they
   can view. This is currently the case, but bugs happen.

Add `User#viewable_starred_projects` to filter the starred projects by
those the user either has explicit access to, or are public or
internal. Then use that in all places where we list the user's starred
projects.
2016-05-10 18:13:52 +01:00
Kamil Trzcinski 0094d8f196 Rename `images` to `container_registry` 2016-05-09 20:29:57 +03:00
Kamil Trzcinski 03b3fe13f6 Make images_enabled configurable 2016-04-29 16:45:00 +02:00
Robert Schilling 54231aa4e0 Styling changes to code and docs 2016-04-13 16:25:24 +02:00
Robert Schilling 3ab9ea8dae Make staring API more restful 2016-04-13 14:26:41 +02:00
Robert Schilling ea2193aaeb API: Star and unstar a project 2016-04-13 14:26:40 +02:00
Zeger-Jan van de Weg 3549d7c1d4 PUT becomes POST on archiving endpoints
Also the specs have a minor improvement. Mainly the access right spec.
Changes are reflected in the docs
2016-03-24 18:58:42 +01:00
Zeger-Jan van de Weg 2c5bcf2e1b Add endpoints for archiving and unarchiving 2016-03-23 22:36:35 +01:00
Dmitriy Zaporozhets e8b3b92dde
Bring share project with group API from EE
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-13 11:52:43 +01:00
Kamil Trzcinski b4c36130cc Rename allow_guest_to_access_builds to public_builds 2016-02-04 12:57:46 +01:00
Kamil Trzcinski 6a5a175d9f Expose allow_guest_to_access_builds in GitLab API 2016-02-04 11:14:12 +01:00
Josh Frye 91b9cbff8d First pass at deleting projects in the background. 2016-01-29 09:14:16 -05:00