From ae0b1420135b577d1f3f29e6a089de77a370623a Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 24 May 2012 17:35:02 +0200 Subject: [PATCH] Fix ordering of dashboard that a user created --- .../webapp/WEB-INF/app/controllers/dashboards_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb index 66c8ba7a15b..3d2d0a4d6a0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb @@ -152,7 +152,7 @@ class DashboardsController < ApplicationController private def position(offset) - dashboard=Dashboard.find(:first, :conditions => ['shared=? and id=? and (user_id is null or user_id<>?)', true, params[:id].to_i, current_user.id]) + dashboard=Dashboard.find(params[:id].to_i) if dashboard add_default_dashboards_if_first_user_dashboard(dashboard.global?) -- 2.39.5