]> source.dussan.org Git - redmine.git/commitdiff
Merged r3249 to r3252 and r3254 from trunk.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 27 Dec 2009 12:41:27 +0000 (12:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 27 Dec 2009 12:41:27 +0000 (12:41 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3255 e93f8b46-1217-0410-a6f0-8f06a7374b81

48 files changed:
app/models/member.rb
app/models/member_role.rb
app/models/project.rb
app/views/projects/settings/_members.rhtml
config/locales/bg.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/da.yml
config/locales/de.yml
config/locales/el.yml
config/locales/en.yml
config/locales/es.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hu.yml
config/locales/id.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ko.yml
config/locales/lt.yml
config/locales/nl.yml
config/locales/no.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/th.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-TW.yml
config/locales/zh.yml
db/migrate/20091227112908_change_wiki_contents_text_limit.rb [new file with mode: 0644]
lib/redmine/scm/adapters/abstract_adapter.rb
public/javascripts/calendar/calendar-setup.js
test/fixtures/groups_users.yml
test/fixtures/member_roles.yml
test/fixtures/members.yml
test/unit/project_test.rb
test/unit/wiki_content_test.rb

index 44a4217458b7c9c732148337c9757f4f9da04c14..3ef1afdef7c0c78f23f129a86d80df174e32acc1 100644 (file)
@@ -57,6 +57,14 @@ class Member < ActiveRecord::Base
     member_roles.detect {|mr| mr.inherited_from}.nil?
   end
   
+  def include?(user)
+    if principal.is_a?(Group)
+      !user.nil? && user.groups.include?(principal)
+    else
+      self.user == user
+    end
+  end
+  
   def before_destroy
     if user
       # remove category based auto assignments for this member
index 286659fc3be959b40a7f185e5190217977b7f9fd..9c28d413d1b901fd03133c203e4a05731cda9cb1 100644 (file)
@@ -30,6 +30,10 @@ class MemberRole < ActiveRecord::Base
     errors.add :role_id, :invalid if role && !role.member?
   end
   
+  def inherited?
+    !inherited_from.nil?
+  end
+  
   private
   
   def remove_member_if_empty
index 4accf5a7cd86fd19a90e78c2674bf34ed9660dca..490c290be8e170534cd4a89aa60fde99369b6e01 100644 (file)
@@ -23,6 +23,7 @@ class Project < ActiveRecord::Base
   # Specific overidden Activities
   has_many :time_entry_activities
   has_many :members, :include => [:user, :roles], :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}"
+  has_many :memberships, :class_name => 'Member'
   has_many :member_principals, :class_name => 'Member', 
                                :include => :principal,
                                :conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{User::STATUS_ACTIVE})"
@@ -583,10 +584,14 @@ class Project < ActiveRecord::Base
 
   # Copies members from +project+
   def copy_members(project)
-    project.members.each do |member|
+    project.memberships.each do |member|
       new_member = Member.new
       new_member.attributes = member.attributes.dup.except("id", "project_id", "created_on")
-      new_member.role_ids = member.role_ids.dup
+      # only copy non inherited roles
+      # inherited roles will be added when copying the group membership
+      role_ids = member.member_roles.reject(&:inherited?).collect(&:role_id)
+      next if role_ids.empty?
+      new_member.role_ids = role_ids
       new_member.project = self
       self.members << new_member
     end
index bfea8675308269918d43e232bdd8919739230467..c0d48b9c26c3b3b096c0eccdecd014d332c55868 100644 (file)
@@ -35,7 +35,8 @@
   <td class="buttons">
       <%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
       <%= link_to_remote(l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},                                              
-                                              :method => :post
+                                              :method => :post,
+                                              :confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil)
                                             }, :title => l(:button_delete),
                                                :class => 'icon icon-del') if member.deletable? %>
   </td>
index 4be99796146779c533ec7683dd85b516e3e4a739..5d7e23aca589f8b562dfe11b4e120d031cf2b1c5 100644 (file)
@@ -869,3 +869,6 @@ bg:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 015b05521dcb3c783b2750a7c7cc83a414037511..6013b9ca17e654a7b54cc9318d02f45e7ace8087 100644 (file)
@@ -893,3 +893,6 @@ bs:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 59b3a44f47869b3130af33f1d54b7c1696e80ee6..4f8193f4637efe4098fbd87d78a3b3b65ab899dc 100644 (file)
@@ -872,3 +872,6 @@ ca:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index bcbf7ac99b5455170d1148213b2c5c596f8c5177..2255ca491b251d71a3f3ce96ee28ecc24ca8f00a 100644 (file)
@@ -875,3 +875,6 @@ cs:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 5123f241fad567c6bb725be7b534fcf861fdcbfb..87cd0e1cfc683cfb9691c13ed146696a8712f60f 100644 (file)
@@ -895,3 +895,6 @@ da:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 81e69ef23d638f96128024cee3fecb3bbe5ffe37..79619efbb8c2b0ba4d3fc3c2ce0330d34bb71cd0 100644 (file)
@@ -895,3 +895,6 @@ de:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 98800250057302d89463b1b96128a762b01bf56e..4a8ffb2b10fa436c9cfd1b51450cbc3cfa992f6b 100644 (file)
@@ -875,3 +875,6 @@ el:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 1c421cb49e65aaf90b31e506da7312876f7f1d58..c21643c0d8d091944312202c185316e45f956e17 100644 (file)
@@ -848,6 +848,7 @@ en:
   text_wiki_page_nullify_children: "Keep child pages as root pages"
   text_wiki_page_destroy_children: "Delete child pages and all their descendants"
   text_wiki_page_reassign_children: "Reassign child pages to this parent page"
+  text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?"
   
   default_role_manager: Manager
   default_role_developper: Developer
index bcf8bd21fb080fa7305e1bec4cc812d754526606..dd0ec9dceb21c64325a918dc9b0838ed1c1c7f6f 100644 (file)
@@ -919,3 +919,6 @@ es:
   setting_mail_handler_body_delimiters: Truncar correos tras una de estas líneas
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 6f255d03e1fcfc47df4089c97ec495b312a132f9..def80f980ad39eac8439f92fc96e7fe722d4efca 100644 (file)
@@ -905,3 +905,6 @@ fi:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 6ecfc240dbf125e69c88ca2878e3a42ea2313c59..97849b55461c4a9e937098445942aca12ab34c17 100644 (file)
@@ -856,6 +856,7 @@ fr:
   text_wiki_page_nullify_children: "Conserver les sous-pages en tant que pages racines"
   text_wiki_page_destroy_children: "Supprimer les sous-pages et toutes leurs descedantes"
   text_wiki_page_reassign_children: "Réaffecter les sous-pages à cette page"
+  text_own_membership_delete_confirmation: "Vous allez supprimer tout ou partie de vos permissions sur ce projet et ne serez peut-être plus autorisé à modifier ce projet.\nEtes-vous sûr de vouloir continuer ?"
   
   default_role_manager: Manager
   default_role_developper: Développeur
index af1c6eb9a79364cc2ca0dd57a6839ba7d885169c..8f65a701f47957f5109a500ead7b427210196b66 100644 (file)
@@ -895,3 +895,6 @@ gl:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index f66970cc32f7dca2cbd9a661eb0b4f521fe80632..f2429c6075cddb148776307ba7cb35024444f2fa 100644 (file)
@@ -879,3 +879,6 @@ he:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index a48228cdf64d325f92e22b411d18240c4c3d8a5c..70a963d3e02ecd5dbe4dd3d53a3a8723d8cae514 100644 (file)
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index e124764c7a6851a9b651b5c1efd51a4df889769a..59d52f67d6ea381fce7b7da9fd842478e0284cae 100644 (file)
@@ -887,3 +887,6 @@ id:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index b469099e39249fcb734081d346e6ad8104500960..2fc70a5fc3f9198c63ba69aa72545ddb461ead9b 100644 (file)
@@ -882,3 +882,6 @@ it:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 0de5160e0aea9392bc2c6aab0244b8a6471ad369..324abaaa79db10359691c5e09d89f07d565be587 100644 (file)
@@ -904,3 +904,6 @@ ja:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 4b82b77f7cf64346d53ed11d0377e2630917d7d5..8c9de9db1dee89f9128fdce3fdeb19819511aff4 100644 (file)
@@ -935,3 +935,6 @@ ko:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 8c874065f796ac3ba18a5350aa70fcc7c302adc3..60eec6138da3dd8f153ad0534959b8cb2909325c 100644 (file)
@@ -943,3 +943,6 @@ lt:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 223df9b44792194f04a3debf9d100abff42acca1..b4630b234cc2f73f675e141df29414543636710c 100644 (file)
@@ -857,3 +857,6 @@ nl:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 461708b3b16f32878acd643ae3b9b19bebc20afd..89c034f22645e36cedb246f36550dd9452ec9559 100644 (file)
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index ad8040aa55f4e5b7cb0ad303e42949dc672cd3f7..4ff9ef255dd1d16d3dd4f8f254dd60de032d482b 100644 (file)
@@ -898,3 +898,6 @@ pl:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index ed8e83e33e01a21153f2a6477f5c5f7680b5675d..2628d81d3b4220dd9b486c970e8e2543d988f52d 100644 (file)
@@ -902,3 +902,6 @@ pt-BR:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 9441e56c27aa4ec587c50360497cb855a3245abb..cacea62931b8b369dee2e796f5717104f1ac04c6 100644 (file)
@@ -887,3 +887,6 @@ pt:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index f91525b735201e924fef081aafafeff83769f268..59b2a072ae05aeca16503e32607adddd1a566433 100644 (file)
@@ -872,3 +872,6 @@ ro:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 4c2822504ac5512d7896bd54259a93e7c38f01fa..682a878db41f96705647328acfee2dc510abafa6 100644 (file)
@@ -983,3 +983,6 @@ ru:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 53b06dc8d88fc2b8181b3dc901b0968e3048a691..cdc04803c57192021255352caccb024ee576aaac 100644 (file)
@@ -874,3 +874,6 @@ sk:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 852ad6ac33a40cc541c4426a1bde15832b35c2cb..66da1b3c4062bdd1e7162c8406ea92bd61658b02 100644 (file)
@@ -871,3 +871,6 @@ sl:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index fd0a5db92c419ea4b536abb42d25c8d303534e7b..4792ff08dcbceec5d1ae6f413d0c23a5debd1d8b 100644 (file)
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 109ca7e6edc2a159d0f9eff4b2eec3809e18768d..e6345b4f6854d4fd061642ebfdbe14431bbcbdd9 100644 (file)
@@ -925,3 +925,6 @@ sv:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 294880baaeeb7be9f2ce47d54012670fd013e096..29f0747391bb32b097e096e5b5baf78a8a5e849d 100644 (file)
@@ -872,3 +872,6 @@ th:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 42677a8707a6f632eea12a0f7a0491103ef56767..0bc54ad9d1d43548ebaef41bf446cd76692b5085 100644 (file)
@@ -902,3 +902,6 @@ tr:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 879b0aaa89c1ad334c52bd5480d29ec80cc52240..c6adec84ba5d0a6c4a59dd1ec8a886703e9ed680 100644 (file)
@@ -871,3 +871,6 @@ uk:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index afd63e9b4cb908da2bec82cf29008e0f654b3f1a..ccba5434f66e16825c8b569b90d6a08b826ffb7c 100644 (file)
@@ -934,3 +934,6 @@ vi:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 44066dbd8d72d4049630b92e63a4bf3941c129f8..54a46fd2d4c78c40fc9721467959639e8349a30e 100644 (file)
   enumeration_system_activity: 系統活動
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
index 63143e1d9601a37840211435f3af8cbd48a6f17c..a5ecdd08ff121fba7bceeb160983a16b21dbf3e2 100644 (file)
@@ -899,3 +899,6 @@ zh:
   setting_mail_handler_body_delimiters: Truncate emails after one of these lines
   permission_add_subprojects: Create subprojects
   label_subproject_new: New subproject
+  text_own_membership_delete_confirmation: |-
+    You are about to remove some or all of your permissions and may no longer be able to edit this project after that.
+    Are you sure you want to continue?
diff --git a/db/migrate/20091227112908_change_wiki_contents_text_limit.rb b/db/migrate/20091227112908_change_wiki_contents_text_limit.rb
new file mode 100644 (file)
index 0000000..225f71e
--- /dev/null
@@ -0,0 +1,16 @@
+class ChangeWikiContentsTextLimit < ActiveRecord::Migration
+  def self.up
+    # Migrates MySQL databases only
+    # Postgres would raise an error (see http://dev.rubyonrails.org/ticket/3818)
+    # Not fixed in Rails 2.3.5
+    if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+      max_size = 16.megabytes
+      change_column :wiki_contents, :text, :text, :limit => max_size
+      change_column :wiki_content_versions, :data, :binary, :limit => max_size
+    end
+  end
+
+  def self.down
+    # no-op
+  end
+end
index b467c2847b00c0cc3cd46dc0b4201ace0a7d6685..962072950169e8a09f07bab6ef4a178e22572eeb 100644 (file)
@@ -182,7 +182,7 @@ module Redmine
         end
         
         def self.shellout(cmd, &block)
-          logger.debug "Shelling out: #{cmd}" if logger && logger.debug?
+          logger.debug "Shelling out: #{strip_credential(cmd)}" if logger && logger.debug?
           if Rails.env == 'development'
             # Capture stderr when running in dev environment
             cmd = "#{cmd} 2>>#{RAILS_ROOT}/log/scm.stderr.log"
index f2b4854308b94bc4a065be60f58fdeac43d6aaff..bf205b5a5f1b6b91dd276d6ec89c994134e9f4e6 100644 (file)
@@ -190,7 +190,7 @@ Calendar.setup = function (params) {
                        cal.create();
                cal.refresh();
                if (!params.position)
-                       cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
+                       cal.showAtElement(params.button || params.displayArea || params.inputField);
                else
                        cal.showAt(params.position[0], params.position[1]);
                return false;
index 3702d6efc6afb13e09969f974599379ef70a3efe..a7ee94e86fb349a28cb86f2c8c2746798f9441cc 100644 (file)
@@ -2,4 +2,7 @@
 groups_users_001: 
   group_id: 10
   user_id: 8
+groups_users_002: 
+  group_id: 11
+  user_id: 8
   
\ No newline at end of file
index e0fc6d064e7078be271222070c6442736d9968e5..7ddcb878a2ccfb8bb6f5fdb33797ffb30a72709a 100644 (file)
@@ -37,3 +37,13 @@ member_roles_009:
   role_id: 2
   member_id: 7
   inherited_from: 7
+member_roles_010: 
+  id: 10
+  role_id: 2
+  member_id: 9
+  inherited_from:
+member_roles_011: 
+  id: 11
+  role_id: 2
+  member_id: 10
+  inherited_from: 10
index 504d64f269996c72a27833b453aa04bd96f5af62..f4d39fb8af0a1c3797ecd824354bc3a56f691378 100644 (file)
@@ -48,3 +48,15 @@ members_008:
   id: 8
   user_id: 1
   mail_notification: true
+members_009: 
+  id: 9
+  created_on: 2006-07-19 19:35:33 +02:00
+  project_id: 2
+  user_id: 11
+  mail_notification: false
+members_010: 
+  id: 10
+  created_on: 2006-07-19 19:35:33 +02:00
+  project_id: 2
+  user_id: 8
+  mail_notification: false
index f1dcb3418f6f6696fdff738f2bfb6681c08fec48..c1fc84330e5e39437f2275e8b2579a704b3955a0 100644 (file)
@@ -633,15 +633,15 @@ class ProjectTest < ActiveSupport::TestCase
       assert_not_equal source_relation_cross_project.id, copied_relation.id
     end
 
-    should "copy members" do
+    should "copy memberships" do
       assert @project.valid?
       assert @project.members.empty?
       assert @project.copy(@source_project)
 
-      assert_equal @source_project.members.size, @project.members.size
-      @project.members.each do |member|
-        assert member
-        assert_equal @project, member.project
+      assert_equal @source_project.memberships.size, @project.memberships.size
+      @project.memberships.each do |membership|
+        assert membership
+        assert_equal @project, membership.project
       end
     end
 
index 372121bda0c30dbb427096f4c1a04dfeb9ff39c7..0261678abb9683971481c5e26cbef6264110d5b7 100644 (file)
@@ -77,4 +77,12 @@ class WikiContentTest < ActiveSupport::TestCase
       assert_kind_of String, version.text
     end
   end
+  
+  def test_large_text_should_not_be_truncated_to_64k
+    page = WikiPage.new(:wiki => @wiki, :title => "Big page")  
+    page.content = WikiContent.new(:text => "a" * 500.kilobyte, :author => User.find(1))
+    assert page.save
+    page.reload
+    assert_equal 500.kilobyte, page.content.text.size
+  end
 end