mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
Increase maximum size for role name (#27625).
Patch by Aleksandar Pavic. git-svn-id: http://svn.redmine.org/redmine/trunk@18296 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
54acf556ab
commit
3ddab944d5
@ -77,7 +77,7 @@ class Role < ActiveRecord::Base
|
||||
|
||||
validates_presence_of :name
|
||||
validates_uniqueness_of :name
|
||||
validates_length_of :name, :maximum => 30
|
||||
validates_length_of :name, :maximum => 255
|
||||
validates_inclusion_of :issues_visibility,
|
||||
:in => ISSUES_VISIBILITY_OPTIONS.collect(&:first),
|
||||
:if => lambda {|role| role.respond_to?(:issues_visibility) && role.issues_visibility_changed?}
|
||||
|
||||
9
db/migrate/20190620135549_change_roles_name_limit.rb
Normal file
9
db/migrate/20190620135549_change_roles_name_limit.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class ChangeRolesNameLimit < ActiveRecord::Migration[5.2]
|
||||
def self.up
|
||||
change_column :roles, :name, :string, :limit => 255, :default => ''
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :roles, :name, :string, :limit => 30, :default => ''
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user