diff app/models/project.rb @ 1519:afce8026aaeb redmine-2.4-integration

Merge from branch "live"
author Chris Cannam
date Tue, 09 Sep 2014 09:34:53 +0100
parents c86dacc2ef0a 467282ce64a4
children a1bdbf8a87d5
line wrap: on
line diff
--- a/app/models/project.rb	Tue Sep 09 09:32:11 2014 +0100
+++ b/app/models/project.rb	Tue Sep 09 09:34:53 2014 +0100
@@ -163,8 +163,8 @@
     allowed_to_condition(user, :view_project, options)
   end
 
-  def self.root_visible_by(user=nil)
-    return "#{Project.table_name}.parent_id IS NULL AND " + visible_condition(user)
+  def self.root_visible_by(user, options={})
+    return "#{Project.table_name}.parent_id IS NULL AND " + visible_condition(user, options)
   end
   
   # Returns a SQL conditions string used to find all projects for which +user+ has the given +permission+