Makes visible scopes accept projects option and deprecate Project.visible_by.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5324 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
c2095f5e2f
commit
405fc07e90
9 files changed
+44
-23
No files matched your search
@@ -42,7 +42,7 @@ class Changeset < ActiveRecord::Base
|
||||
validates_uniqueness_of :scmid, :scope => :repository_id, :allow_nil => true
|
||||
|
||||
named_scope :visible, lambda {|*args| { :include => {:repository => :project},
|
||||
:conditions => Project.allowed_to_condition(args.first || User.current, :view_changesets) } }
|
||||
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_changesets, *args) } }
|
||||
|
||||
def revision=(r)
|
||||
write_attribute :revision, (r.nil? ? nil : r.to_s)
|
||||
|
||||
Reference in new issue
Block a user