Project

General

Profile

Defect #2719 » 2017_change_max_username_length.patch

quilt patch for the Ubuntu package on the PPA - Bruno Bigras, 2011-10-25 20:12

View differences:

redmine-1.2.1+dfsg2/app/models/user.rb 2011-10-25 10:04:23.575036804 -0400
67 67
  validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false
68 68
  # Login must contain lettres, numbers, underscores only
69 69
  validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i
70
  validates_length_of :login, :maximum => 30
70
  validates_length_of :login, :maximum => 60
71 71
  validates_length_of :firstname, :lastname, :maximum => 30
72 72
  validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true
73 73
  validates_length_of :mail, :maximum => 60, :allow_nil => true
redmine-1.2.1+dfsg2/db/migrate/20111125000000_change_user_login_limit.rb 2011-10-25 10:02:35.782250550 -0400
1
class ChangeUserLoginLimit < ActiveRecord::Migration
2
  def self.up
3
    change_column :users, :login, :string, :limit => 60, :default => "", :null => false
4
  end
5

  
6
  def self.down
7
    change_column :users, :login, :string, :limit => 30, :default => "", :null => false
8
  end
9
end
(2-2/2)