diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-20 18:45:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-20 18:45:51 +0000 |
commit | 26e75568cf490a9802825eea2a40fa32f21d4458 (patch) | |
tree | 903c67e8b17f44a330a1f737273679179a3f6713 /app/models/repository/cvs.rb | |
parent | 37cbbcea71eb3350f771a93c8c062af55b859376 (diff) | |
download | redmine-26e75568cf490a9802825eea2a40fa32f21d4458.tar.gz redmine-26e75568cf490a9802825eea2a40fa32f21d4458.zip |
Makes repository url read-only after saving.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9878 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository/cvs.rb')
-rw-r--r-- | app/models/repository/cvs.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index f43a15620..3cf5b7036 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -21,7 +21,8 @@ require 'digest/sha1' class Repository::Cvs < Repository validates_presence_of :url, :root_url, :log_encoding - safe_attributes 'root_url' + safe_attributes 'root_url', + :if => lambda {|repository, user| repository.new_record?} def self.human_attribute_name(attribute_key_name, *args) attr_name = attribute_key_name.to_s |