Skip to content

Commit

Permalink
[api] allow to remove repositories via request in projects with devel…
Browse files Browse the repository at this point in the history
… packages
  • Loading branch information
adrianschroeter committed Feb 8, 2013
1 parent 103b158 commit b5e110e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/app/controllers/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1152,14 +1152,14 @@ def command_changestate
end
else
if action.action_type == :delete
# this is valid for project and repository removal
target_project.can_be_deleted?

if action.target_repository
r=Repository.find_by_project_and_repo_name(target_project.name, action.target_repository)
unless r
render_error :status => 400, :errorcode => "repository_missing", :message => "The repository #{target_project} / #{action.target_repository} does not exist"
end
else
# remove entire project
target_project.can_be_deleted?
end
end
end
Expand Down

0 comments on commit b5e110e

Please sign in to comment.