From 4449f9bf5adf0b70666482a320ce663765296b51 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Thu, 12 May 2011 11:20:00 +0200 Subject: [PATCH] Fix error log in webapp --- .../WEB-INF/app/controllers/plugins/resource_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) 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| -- 2.39.5