From 9441739d634a8bea12d4d674e8faa288c8a5a7d9 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Fri, 21 Nov 2014 10:55:01 +0100 Subject: [PATCH] Remove obsolete link to available statuses This was replaced by the work package form --- doc/apiv3-documentation.apib | 14 +++++--------- frontend/tests/integration/mocks/work-package.json | 4 ---- .../tests/integration/mocks/work-packages/819.json | 4 ---- .../tests/integration/mocks/work-packages/820.json | 4 ---- .../tests/integration/mocks/work-packages/821.json | 4 ---- .../v3/work_packages/work_package_representer.rb | 8 -------- 6 files changed, 5 insertions(+), 33 deletions(-) diff --git a/doc/apiv3-documentation.apib b/doc/apiv3-documentation.apib index 0db6c527b7..2f670b6e53 100644 --- a/doc/apiv3-documentation.apib +++ b/doc/apiv3-documentation.apib @@ -571,7 +571,7 @@ Updates an activity's comment and, on success, returns the updated activity. to see it. **Required permission:** view project - + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. Thatswhy a 404 is returned here, even if a 403 might be more appropriate.* @@ -614,7 +614,7 @@ Updates an activity's comment and, on success, returns the updated activity. to see it. **Required permission:** view project (defining the category) - + *Note: A client without sufficient permissions shall not be able to test for the existence of a category. Thatswhy a 404 is returned here, even if a 403 might be more appropriate.* @@ -1190,7 +1190,7 @@ but are also limited to the projects that the current user is allowed to see. to see it. **Required permission:** view work packages **or** manage versions (any project where the given version is available) - + *Note: A client without sufficient permissions shall not be able to test for the existence of a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* @@ -1805,7 +1805,7 @@ Note that due to sharing this might be more than the versions *defined* by that to see it. **Required permission:** view work packages **or** manage versions (on given project) - + *Note: A client without sufficient permissions shall not be able to test for the existence of a project. That's why a 404 is returned here, even if a 403 might be more appropriate.* @@ -1856,7 +1856,7 @@ Note that due to sharing this might be more than the versions *defined* by that to see it. **Required permission:** view work packages **or** manage versions (any project where the version is available) - + *Note: A client without sufficient permissions shall not be able to test for the existence of a version. That's why a 404 is returned here, even if a 403 might be more appropriate.* @@ -1972,10 +1972,6 @@ Note that due to sharing this might be more than the versions *defined* by that "version": { "href": "/api/v3/versions/1" }, - "availableStatuses": { - "href": "/api/v3/work_packages/1528/available_statuses", - "title": "Available Statuses" - }, "availableWatchers": { "href": "/api/v3/work_packages/1528/available_watchers", "title": "Available Watchers" diff --git a/frontend/tests/integration/mocks/work-package.json b/frontend/tests/integration/mocks/work-package.json index 9b85eab667..f2afc68442 100644 --- a/frontend/tests/integration/mocks/work-package.json +++ b/frontend/tests/integration/mocks/work-package.json @@ -34,10 +34,6 @@ "href": "/api/v3/users/34", "title": "Reinhold Weber - Joe3757" }, - "availableStatuses": { - "href": "/api/v3/work_packages/819/available_statuses", - "title": "Available Statuses" - }, "availableWatchers": { "href": "/api/v3/work_packages/819/available_watchers", "title": "Available Watchers" diff --git a/frontend/tests/integration/mocks/work-packages/819.json b/frontend/tests/integration/mocks/work-packages/819.json index 9eb1db9afb..d1aa50c98b 100644 --- a/frontend/tests/integration/mocks/work-packages/819.json +++ b/frontend/tests/integration/mocks/work-packages/819.json @@ -39,10 +39,6 @@ "href": "/api/v3/users/5", "title": "Freida Fay - Christine6938" }, - "availableStatuses": { - "href": "/api/v3/work_packages/819/available_statuses", - "title": "Available Statuses" - }, "availableWatchers": { "href": "/api/v3/work_packages/819/available_watchers", "title": "Available Watchers" diff --git a/frontend/tests/integration/mocks/work-packages/820.json b/frontend/tests/integration/mocks/work-packages/820.json index 6cbc2cf838..9eff20452b 100644 --- a/frontend/tests/integration/mocks/work-packages/820.json +++ b/frontend/tests/integration/mocks/work-packages/820.json @@ -29,10 +29,6 @@ "href": "/api/v3/users/5", "title": "Freida Fay - Christine6938" }, - "availableStatuses": { - "href": "/api/v3/work_packages/820/available_statuses", - "title": "Available Statuses" - }, "availableWatchers": { "href": "/api/v3/work_packages/820/available_watchers", "title": "Available Watchers" diff --git a/frontend/tests/integration/mocks/work-packages/821.json b/frontend/tests/integration/mocks/work-packages/821.json index 923924e3ad..8d1e9e69b2 100644 --- a/frontend/tests/integration/mocks/work-packages/821.json +++ b/frontend/tests/integration/mocks/work-packages/821.json @@ -39,10 +39,6 @@ "href": "/api/v3/users/5", "title": "Freida Fay - Christine6938" }, - "availableStatuses": { - "href": "/api/v3/work_packages/821/available_statuses", - "title": "Available Statuses" - }, "availableWatchers": { "href": "/api/v3/work_packages/821/available_watchers", "title": "Available Watchers" diff --git a/lib/api/v3/work_packages/work_package_representer.rb b/lib/api/v3/work_packages/work_package_representer.rb index 7a25a7de65..39e800b7cb 100644 --- a/lib/api/v3/work_packages/work_package_representer.rb +++ b/lib/api/v3/work_packages/work_package_representer.rb @@ -126,14 +126,6 @@ module API } unless represented.assigned_to.nil? end - link :availableStatuses do - { - href: "#{root_path}api/v3/work_packages/#{represented.id}/available_statuses", - title: 'Available Statuses' - } if @current_user.allowed_to?({ controller: :work_packages, action: :update }, - represented.project) - end - link :availableWatchers do { href: api_v3_paths.available_watchers(represented.id),