Adds a setting to choose which role is given to a non-admin user who creates a project (#1007).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2754 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-05-17 14:35:00 +00:00
parent ce8bd16020
commit 52b5b29203
38 changed files with 44 additions and 1 deletions
+1
View File
@@ -20,6 +20,7 @@ class Role < ActiveRecord::Base
BUILTIN_NON_MEMBER = 1
BUILTIN_ANONYMOUS = 2
named_scope :givable, { :conditions => "builtin = 0", :order => 'position' }
named_scope :builtin, lambda { |*args|
compare = 'not' if args.first == true
{ :conditions => "#{compare} builtin = 0" }