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:
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user