gitlab-org--gitlab-foss/spec
Dmitriy Zaporozhets e49b636497 Merge branch 'feature_api_project_edit' into 'master'
API: Implement edit via API for projects

I've picked up https://github.com/gitlabhq/gitlabhq/pull/8055 fixed the few hound warnings and replaced all double quotes in the spec file where possible.

# From the original PR:

Implements edit via API for projects. Edit was part of missing features in feature request Full CRUD operations via API for projects.
http://feedback.gitlab.com/forums/176466-general/suggestions/3904506-full-crud-operations-via-api-for-projects

Feature is implemented using existing UpdateService for projects. Permission to change visibility level and name are checked in addition to check for permission to administer project.

Doesn't allow updating project namespace id, because there was existing API-method for transferring project to a group.

Documentation added to doc/api/projects.md. Uses API request PUT /projects/:id .

Tests included for:
1. Success for changing path
2. Success for changing name
3. Success for changing visibility level
4. Success for changing all other attributes
5. Success for changing name & path to existing name & path but in different namespace
6. Failure if not authenticated
7. Failure if path exists in project's namespace
8. Failure if name exists in project's namespace
9. Failure if not sufficient permission to change name
10. Failure if not sufficient permission to change visibility level
11. Failure if not sufficient permission to change other attributes

Allows updating following parameters:

* name
* path
* visibility_level
* public
* default_branch
* issues_enabled
* wiki_enabled
* snippets_enabled
* merge_requests_enabled
* description

See merge request !310
2015-01-22 23:02:50 +00:00
..
controllers rspec fix 2015-01-10 20:04:06 -08:00
factories Annotate models 2015-01-22 09:40:03 -08:00
features Merge pull request #8585 from duduribeiro/fix_email_in_ssh_help_page 2015-01-19 15:01:00 -08:00
finders More tests for issues finder 2014-12-05 17:25:22 +02:00
fixtures
helpers Remove unnecessary / from avatar url 2015-01-19 14:08:06 +01:00
javascripts
lib Fix vote specs for mysql 2015-01-22 12:08:47 -08:00
mailers Remove unused password argument from notification 2014-12-01 15:11:26 +01:00
models Annotate models 2015-01-22 09:40:03 -08:00
requests/api Merge branch 'feature_api_project_edit' into 'master' 2015-01-22 23:02:50 +00:00
routing Merge pull request #7978 from cirosantilli/edit-preview-route-test 2014-12-20 20:17:25 +02:00
services Add action property to merge request hook 2015-01-20 10:50:24 +01:00
support Add flatten-dir branch to seed repo 2015-01-10 22:48:16 -08:00
tasks/gitlab Add rake task for google schema whitelisting. 2014-12-04 15:22:10 +01:00
workers
factories.rb Remove unneeded password_confirmation from seed. 2014-12-28 14:42:15 +01:00
factories_spec.rb
spec_helper.rb