diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-19 11:34:48 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-19 11:34:48 +0200 |
commit | 7ae139566b46050b31bf01a6302af560fc129819 (patch) | |
tree | cc342c422373d89d12aa763a8a924d241192b4a1 /lib | |
parent | a32f7766098bf38b1028168b4919516460a562e9 (diff) | |
parent | 8adeda37b55fc992e3cb15422cae5d9646640630 (diff) | |
download | gitlab-ce-full-width-tables.tar.gz |
Merge branch 'master' into full-width-tablesfull-width-tables
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/projects.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/reference_extractor.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index c2fb36b4143..67ee66a2058 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -246,8 +246,8 @@ module API # Example Request: # DELETE /projects/:id/fork delete ":id/fork" do - authenticated_as_admin! - unless user_project.forked_project_link.nil? + authorize! :remove_fork_project, user_project + if user_project.forked? user_project.forked_project_link.destroy end end diff --git a/lib/gitlab/reference_extractor.rb b/lib/gitlab/reference_extractor.rb index 333bd059055..da8df8a3025 100644 --- a/lib/gitlab/reference_extractor.rb +++ b/lib/gitlab/reference_extractor.rb @@ -27,7 +27,7 @@ module Gitlab def references @references ||= Hash.new do |references, type| type = type.to_sym - return references[type] if references.has_key?(type) + next references[type] if references.has_key?(type) references[type] = pipeline_result(type) end |