aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-12-11 11:34:47 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-12-11 11:36:13 +0100
commitdaddbc85820f4daea58221186207c7bac93b1201 (patch)
treee26a59d3148ff971296419ab20f2b5c793267fba
parente4e5d4bf9d580923275718254fa1f432337c49f8 (diff)
downloadsonarqube-daddbc85820f4daea58221186207c7bac93b1201.tar.gz
sonarqube-daddbc85820f4daea58221186207c7bac93b1201.zip
SONAR-5923 A project admin user cannot delete a project
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
index 8af012accdd..3f363903acd 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
@@ -30,13 +30,11 @@ class ProjectController < ApplicationController
end
def delete_form
- access_denied unless (is_admin?(@project))
@project = get_current_project(params[:id])
render :partial => 'delete_form'
end
def delete
- access_denied unless (is_admin?(@project))
@project = get_current_project(params[:id])
# Ask the resource deletion manager to start the migration
@@ -68,7 +66,7 @@ class ProjectController < ApplicationController
deletion_manager = ResourceDeletionManager.instance
if deletion_manager.currently_deleting_resources? ||
- (!deletion_manager.currently_deleting_resources? && deletion_manager.deletion_failures_occured?)
+ (!deletion_manager.currently_deleting_resources? && deletion_manager.deletion_failures_occured?)
# display the same page again and again
# => implicit render "pending_deletion.html.erb"
else
@@ -223,7 +221,7 @@ class ProjectController < ApplicationController
@snapshot=@project.last_snapshot
@snapshots = Snapshot.all(:conditions => ["status='P' AND project_id=?", @project.id],
- :include => 'events', :order => 'snapshots.created_at DESC')
+ :include => 'events', :order => 'snapshots.created_at DESC')
end
def delete_snapshot_history
@@ -251,7 +249,7 @@ class ProjectController < ApplicationController
def set_links
project = get_current_project(params[:project_id])
- project.custom_links.each {|link| link.delete}
+ project.custom_links.each { |link| link.delete }
params.each_pair do |param_key, value|
if (param_key.starts_with?('name_'))