]> source.dussan.org Git - redmine.git/commitdiff
Merged r14974 and r14975 from trunk to 3.2-stable (#21447)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 7 Jan 2016 04:16:44 +0000 (04:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 7 Jan 2016 04:16:44 +0000 (04:16 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15009 e93f8b46-1217-0410-a6f0-8f06a7374b81

53 files changed:
app/models/user_preference.rb
app/views/settings/_authentication.html.erb
config/locales/ar.yml
config/locales/az.yml
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-GB.yml
config/locales/en.yml
config/locales/es-PA.yml
config/locales/es.yml
config/locales/et.yml
config/locales/eu.yml
config/locales/fa.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hr.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/lv.yml
config/locales/mk.yml
config/locales/mn.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/sq.yml
config/locales/sr-YU.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
config/settings.yml
test/unit/user_preference_test.rb

index 80b3e6b9deb7938fcdde502fddaf75852e6eb48e..6e7876abbdd8391dd472dc1a6b66b72dab759bcb 100644 (file)
@@ -25,6 +25,9 @@ class UserPreference < ActiveRecord::Base
 
   def initialize(attributes=nil, *args)
     super
+    if new_record? && !(attributes && attributes.key?(:hide_mail))
+      self.hide_mail = Setting.default_users_hide_mail?
+    end
     self.others ||= {}
   end
 
index f9c569cb8545ee8b37b9d784d6b22deefa2e1159..35aa66425d5e978af33771783b4d2bf6df340aa8 100644 (file)
   <p><em class="info"><%= l(:text_session_expiration_settings) %></em></p>
 </fieldset>
 
+<fieldset class="box">
+  <legend><%= l(:label_default_values_for_new_users) %></legend>
+
+  <div class="tabular settings">
+    <p><%= setting_check_box :default_users_hide_mail, :label => :field_hide_mail %></p>
+  </div>
+</fieldset>
+
 <%= submit_tag l(:button_save) %>
 <% end %>
index 894e299cd3f7422402a97142bfdd071582561895..8cd0a88de26459a69e3805f41f7bfb11d7ec7a22 100644 (file)
@@ -1181,3 +1181,4 @@ ar:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index e500bd54604bbd17130725e884b9d0214ed9deb4..9c41d4a791068a4d8441cb51cd681505ee1102dd 100644 (file)
@@ -1276,3 +1276,4 @@ az:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 591e338dcb3715a266e46b651addde537dd29785..18b6adaafbcff7dc748913cdd471e37ee46fc9fa 100644 (file)
@@ -1172,3 +1172,4 @@ bg:
   description_date_from: Въведете начална дата
   description_date_to: Въведете крайна дата
   text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
+  label_default_values_for_new_users: Default values for new users
index 9a50ef93d4f77cd93244dc809032fbc52c27e58e..ca4bd07216c841df5817f883a6ed6f72f8bcee68 100644 (file)
@@ -1194,3 +1194,4 @@ bs:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 24370a80af138169cb184a0c373be058182e947e..d6674a5e53a22fb8949318d234bf52de4f2b397f 100644 (file)
@@ -1183,3 +1183,4 @@ ca:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index db55f214613b63fa7fb607a4bae80eba087f981d..a888e89da20996de6289ef222cca7ed4ecbf198c 100644 (file)
@@ -1182,3 +1182,4 @@ cs:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 11670eae65b0f09f15e0f65c1f899d78bc1ad225..e4543d0c89fcede72df1f21ad2666594822441ec 100644 (file)
@@ -1198,3 +1198,4 @@ da:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 0885f5ba8ff9aea98d50fc2a8ebf854540714389..56ed80627a0ab16c2b7979e419278b5cca64939c 100644 (file)
@@ -1190,3 +1190,4 @@ de:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index af9d8cf885b93ba9337dafd63682c0773744c36c..d2022735ff2c8f86d2dc6591f0600ef3a3080e10 100644 (file)
@@ -1181,3 +1181,4 @@ el:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 0756d936890abc9f07a6d390a2272d87410e73af..2d1e86a62bbc85420fbb0649cf7953f144610d24 100644 (file)
@@ -1183,3 +1183,4 @@ en-GB:
   error_attachment_extension_not_allowed: Attachment extension %{extension} is not allowed
   setting_attachment_extensions_allowed: Allowed extensions
   setting_attachment_extensions_denied: Disallowed extensions
+  label_default_values_for_new_users: Default values for new users
index 24d5fe7c441cdcb5d99da9a93ac6a96cece75783..7d98034f6cd32458ec4aa3825588f74390d004e8 100644 (file)
@@ -975,6 +975,7 @@ en:
   label_create_missing_values: Create missing values
   label_api: API
   label_field_format_enumeration: Key/value list
+  label_default_values_for_new_users: Default values for new users
 
   button_login: Login
   button_submit: Submit
index bf3cbed824e7465bbd05a4bfdad4f8dfe3f1c840..d55482bfaacb52157ad5a0f0d15eb94f497b92f5 100644 (file)
@@ -1215,3 +1215,4 @@ es-PA:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index fa9670afe169a4950ad6e6d29bdaee3faf38d7f3..4e7499cbbf2418a4b4e5a73e771b532fb1a050ef 100644 (file)
@@ -1213,3 +1213,4 @@ es:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 8a8852b12870c94f9ae80b8d6a47d430d5f41bab..87a94c512562a1f74896a71027bb97f2c47df4e2 100644 (file)
@@ -1194,3 +1194,4 @@ et:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 42a8f998fb22b9ce6f97a6b6421baa60a122560c..20e7222cdf7710526fe94533ccbbf956b917ac4d 100644 (file)
@@ -1182,3 +1182,4 @@ eu:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 7b5f0651cf3caf3621e60a42697fbef0b3df2fc3..3ffc4748651204b5059f7aacbe37e27d52dbc902 100644 (file)
@@ -1182,3 +1182,4 @@ fa:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 201aaac06237be1358cdcbc6c6891d53cce8e191..5021546cf97c5a352c1a804178e86a63fdf935ff 100644 (file)
@@ -1202,3 +1202,4 @@ fi:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 4ec1d33682a8f28aa1ada903dbaad3d9d741fa9e..43873caf3e56aec5751f239480451e41af09c459 100644 (file)
@@ -993,6 +993,7 @@ fr:
   label_create_missing_values: Créer les valeurs manquantes
   label_api: API
   label_field_format_enumeration: Liste clé/valeur
+  label_default_values_for_new_users: Valeurs par défaut pour les nouveaux utilisateurs
 
   button_login: Connexion
   button_submit: Soumettre
index 5d83e7cab975a1e3d73ecbeb305ad57a97f5cdbc..381c2c9e7442a2dfce9a582fc97ce9e0e1a889f4 100644 (file)
@@ -1189,3 +1189,4 @@ gl:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 3485c0a57b6af2b2c1a97e7b398e05908b8e0702..cf5a1dd0ef2c0356f91f34f1a661061428afe459 100644 (file)
@@ -1186,3 +1186,4 @@ he:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 8931e8af12f1a4aefe3fe8a4c3ddeb9213c281e7..079ddfd8d83dcda6b99533f78d407fea59f82b72 100644 (file)
@@ -1180,3 +1180,4 @@ hr:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index ebed6d828bd993113deeaf904b8e87318ec81c3c..026d89fba745660172f28d7c783b02f93620f500 100644 (file)
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 573a3b9e9008c1dd1802ff35cdd69f071eb495ff..01a9304dcb504a24de69a23deb9ee5a72c3f7eb4 100644 (file)
@@ -1185,3 +1185,4 @@ id:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index e0b377cadc6f2f519b68399a67b15e09e06578f1..0f9da368a82fbef96099460fea939348183a859a 100644 (file)
@@ -1176,3 +1176,4 @@ it:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 2309a6e14274fca794d4e9bb074f4e0bc2bbac23..6713a85df5c8612824f2579f5db1133668a5e777 100644 (file)
@@ -1194,3 +1194,4 @@ ja:
   setting_attachment_extensions_denied: 禁止する拡張子
   label_any_open_issues: 未完了のチケット
   label_no_open_issues: なし または完了したチケット
+  label_default_values_for_new_users: Default values for new users
index d2dda59d4a67ee22a47a9257ca83b24514aab959..0097370a8e8db873dc152537643b64fc8bd3cbfd 100644 (file)
@@ -1225,3 +1225,4 @@ ko:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 705f152a369de1e7ce9272c26702ceeb77ab4be0..6498353772879dd7d8efbb5454af95ffaf17af13 100644 (file)
@@ -1240,3 +1240,4 @@ lt:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 373325be8ec6e300f02fff8bfebb4f0d67233dba..bcee88d6c06cedc6251be8d5cdc8166301face45 100644 (file)
@@ -1175,3 +1175,4 @@ lv:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 012147336fd41e71d6365ba9f0452b230d90a959..6c7a2af08125812b795f6635c14ca260f570b8c4 100644 (file)
@@ -1181,3 +1181,4 @@ mk:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index e365a5b96056b0a190e91be1cbf8a60e1a541ae4..c5a74e06f42b2709faa5610d6dd0746eb1518e38 100644 (file)
@@ -1182,3 +1182,4 @@ mn:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index c4a588c907be0028c02bb6752f724c57626b4107..9a2a17542c42f631ff22a1759487e66907196f0a 100644 (file)
@@ -1160,3 +1160,4 @@ nl:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 2ebf5525bc247a106a5ab9f4f159ad8694056341..35f2b8e91f07692fd9721b7ee34436e6c3500196 100644 (file)
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 442e7f77c550f2d8a0439f96b54da8f72fd8d699..50cd2f39c1fb8c30175cb0e9dae43e663feed99c 100644 (file)
@@ -1196,3 +1196,4 @@ pl:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 1ad3648868a48fea34e2d1d096af32f3c8fc5289..8802ba324f5ba895ee33e2c8102bf602a3bd6a35 100644 (file)
@@ -1200,3 +1200,4 @@ pt-BR:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 1dcaba5c1389b854ed283a24fa60402a5b299e63..da696f2b36733b62ab2b9022c840f2cd663931c9 100644 (file)
@@ -1183,3 +1183,4 @@ pt:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index b4bd7944568a1fb90bb7c968c69c4ec74bc883aa..2e89625a162ecbdc153dcc75d26335a846393fe8 100644 (file)
@@ -1176,3 +1176,4 @@ ro:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 7a62d0efd06f320bd136d70652c83651869c900d..26c72a5da4ccdea53d54c743fb32f337d02e77d5 100644 (file)
@@ -1284,3 +1284,4 @@ ru:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 9bf3dbf98d4802554a4a20002c0d52940741c630..0508f1fe5c95362a43d771c68d7bbe0a11bf61bb 100644 (file)
@@ -1171,3 +1171,4 @@ sk:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index b8a43032f990bcc84d9f04037e38a086d164971f..56742220dd6c9e5bcb37fafa8e8b925678bfa6d4 100644 (file)
@@ -1181,3 +1181,4 @@ sl:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 0520ac04dd2b90daefd7f6b2e762eb19700a8f27..fd2fdd33de69562d67bf146a7c6dd3582ea5fe3f 100644 (file)
@@ -1177,3 +1177,4 @@ sq:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index e8091cab594f54d9f643d9446f32e61775cdaf87..3b30b09a8b319fc107a44fc2c5d71837352a350c 100644 (file)
@@ -1183,3 +1183,4 @@ sr-YU:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 6b1f0777da3fa6eb39a80ae84e5f2ff6e8b10221..89e5cfa96011f0300f7d36f4735832088d04d98e 100644 (file)
@@ -1182,3 +1182,4 @@ sr:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index e214a8d5375bf5f422e75d60e9243daf649d4222..73be757c97d1184f92f9b105caccfbd5b7d42fe9 100644 (file)
@@ -1214,3 +1214,4 @@ sv:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 4f2d00a67eb6f2710f4522b9f7932ca980715e95..122fcd4e1c93fed1cd1ad0bec33dae9e3c908587 100644 (file)
@@ -1178,3 +1178,4 @@ th:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 5a405a25444e900cb7f124845b3ca40daace001f..69a2255cea31d22f8056880e7c246790d9dd3604 100644 (file)
@@ -1190,3 +1190,4 @@ tr:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index d7f716bfc69a2bbf5393f519b02e992d66d48e58..077bfbad31e4a03e538cff759905e16c8e12ba05 100644 (file)
@@ -1176,3 +1176,4 @@ uk:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index 82b46ff077c0b4ef23bd1d5012aaacdaf043e5f6..632e446245024a82e83d909a3b834f7015c2fbc3 100644 (file)
@@ -1234,3 +1234,4 @@ vi:
   setting_attachment_extensions_denied: Disallowed extensions
   label_any_open_issues: any open issues
   label_no_open_issues: no open issues
+  label_default_values_for_new_users: Default values for new users
index a319470ea145d623d0002fcb7de3d085367c7696..efbd6378d0503bfe355198a43e1a1d30f69b908e 100644 (file)
   description_date_from: 輸入起始日期
   description_date_to: 輸入結束日期
   text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
+  label_default_values_for_new_users: Default values for new users
index 2e85dafa6c5e3e81c3bff3a9993ae85600d1d87c..b162e536a17a894bd36332fda7e29e32c51fc50a 100644 (file)
@@ -1176,3 +1176,4 @@ zh:
   setting_attachment_extensions_denied: 禁止上传的附件类型
   label_any_open_issues: 任意进行中的问题
   label_no_open_issues: 任意已关闭的问题
+  label_default_values_for_new_users: Default values for new users
index 7180dac3fa6fde29fabdf68fa26a9d49012c84a3..5031b68d3f0a31684897bc6d7c22262358945119 100644 (file)
@@ -217,6 +217,8 @@ sequential_project_identifiers:
   default: 0
 # encodings used to convert repository files content to UTF-8
 # multiple values accepted, comma separated
+default_users_hide_mail:
+  default: 1
 repositories_encodings:
   default: ''
 # encoding used to convert commit logs to UTF-8
index c76862408b78e06c806afc1af60b785f0771dba3..bfdcd185abca12aecb53f8c5190e7f4a82be7667 100644 (file)
@@ -25,6 +25,13 @@ class UserPreferenceTest < ActiveSupport::TestCase
     assert_equal true, preference.hide_mail
   end
 
+  def test_hide_mail_should_default_to_false_with_setting
+    with_settings :default_users_hide_mail => '0' do
+      preference = UserPreference.new
+      assert_equal false, preference.hide_mail
+    end
+  end
+
   def test_create
     user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
     user.login = "newuser"