aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-05-12 11:20:00 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-05-12 11:20:00 +0200
commit4449f9bf5adf0b70666482a320ce663765296b51 (patch)
tree0dcd2e487d21843f6dee18e956e33775e617cb2d /sonar-server
parentf2a0e5c0ffd8f955fb35732ea6eacbbb20187e26 (diff)
downloadsonarqube-4449f9bf5adf0b70666482a320ce663765296b51.tar.gz
sonarqube-4449f9bf5adf0b70666482a320ce663765296b51.zip
Fix error log in webapp
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb
index 83ad7be1879..5db6657cebd 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb
@@ -24,11 +24,15 @@ class Plugins::ResourceController < ApplicationController
def index
@project = ::Project.by_key(params[:id])
+ return redirect_to home_url if @project.nil?
+
@snapshot=@project.last_snapshot
page_id=params[:page]
@page_proxy=java_facade.getPage(page_id)
+ return redirect_to home_url if @page_proxy.nil?
+
authorized=@page_proxy.getUserRoles().size==0
unless authorized
@page_proxy.getUserRoles().each do |role|