Enable global time logging at /time_entries/new (#10020).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8691 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -87,6 +87,17 @@ class Project < ActiveRecord::Base
|
||||
named_scope :status, lambda {|arg| arg.blank? ? {} : {:conditions => {:status => arg.to_i}} }
|
||||
named_scope :all_public, { :conditions => { :is_public => true } }
|
||||
named_scope :visible, lambda {|*args| {:conditions => Project.visible_condition(args.shift || User.current, *args) }}
|
||||
named_scope :allowed_to, lambda {|*args|
|
||||
user = User.current
|
||||
permission = nil
|
||||
if args.first.is_a?(Symbol)
|
||||
permission = args.shift
|
||||
else
|
||||
user = args.shift
|
||||
permission = args.shift
|
||||
end
|
||||
{ :conditions => Project.allowed_to_condition(user, permission, *args) }
|
||||
}
|
||||
named_scope :like, lambda {|arg|
|
||||
if arg.blank?
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user