From a40f9510635cf303849a5ef721aacb6d4fc6f4e6 Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Mon, 7 May 2012 10:32:28 +1000 Subject: [PATCH] Fix #5046 error for non-admin users --- app/controllers/timesheet_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/timesheet_controller.rb b/app/controllers/timesheet_controller.rb index 0e94679..dca3697 100644 --- a/app/controllers/timesheet_controller.rb +++ b/app/controllers/timesheet_controller.rb @@ -124,7 +124,7 @@ def allowed_projects elsif Setting.plugin_timesheet_plugin['project_status'] == 'all' Project.timesheet_order_by_name.timesheet_with_membership(User.current) else - Project.timesheet_order_by_name.all(:conditions => Project.visible_by(User.current)) + Project.timesheet_order_by_name.all(:conditions => Project.visible_condition(User.current), :order => 'name ASC') end end