diff --git app/models/project.rb app/models/project.rb index 5063aa4..3710e03 100644 --- app/models/project.rb +++ app/models/project.rb @@ -445,6 +445,8 @@ class Project < ActiveRecord::Base @rolled_up_versions ||= Version.scoped(:include => :project, :conditions => ["#{Project.table_name}.lft >= ? AND #{Project.table_name}.rgt <= ? AND #{Project.table_name}.status <> #{STATUS_ARCHIVED}", lft, rgt]) + @rolled_up_versions.reject! { |version| !User.current.allowed_to?(:view_issues, version.project) } unless Setting.public_versions? + @rolled_up_versions end # Returns a scope of the Versions used by the project @@ -465,6 +467,8 @@ class Project < ActiveRecord::Base "))") end end + @shared_versions.reject! { |version| !User.current.allowed_to?(:view_issues, version.project) } unless Setting.public_versions? + @shared_versions end # Returns a hash of project users grouped by role diff --git app/views/settings/_projects.html.erb app/views/settings/_projects.html.erb index 28fd9b5..44f13a5 100644 --- app/views/settings/_projects.html.erb +++ app/views/settings/_projects.html.erb @@ -14,6 +14,8 @@

<%= setting_select :new_project_user_role_id, Role.find_all_givable.collect {|r| [r.name, r.id.to_s]}, :blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %>

+ +

<%= setting_check_box :public_versions %>

<%= submit_tag l(:button_save) %> diff --git config/locales/ar.yml config/locales/ar.yml index 52e4949..4bdcb21 100644 --- config/locales/ar.yml +++ config/locales/ar.yml @@ -1087,3 +1087,4 @@ ar: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: الإجمالي + setting_public_versions: Shared versions visible to non members diff --git config/locales/az.yml config/locales/az.yml index 901df19..e70f359 100644 --- config/locales/az.yml +++ config/locales/az.yml @@ -1184,3 +1184,4 @@ az: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Cəmi + setting_public_versions: Shared versions visible to non members diff --git config/locales/bg.yml config/locales/bg.yml index 78fb6fe..02fd2ed 100644 --- config/locales/bg.yml +++ config/locales/bg.yml @@ -1084,3 +1084,5 @@ bg: description_date_from: Въведете начална дата description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
Промяна след създаването му не е възможна.' + + setting_public_versions: Shared versions visible to non members diff --git config/locales/bs.yml config/locales/bs.yml index 50f2300..43a9855 100644 --- config/locales/bs.yml +++ config/locales/bs.yml @@ -1100,3 +1100,4 @@ bs: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/ca.yml config/locales/ca.yml index f9e6a40..aba39c1 100644 --- config/locales/ca.yml +++ config/locales/ca.yml @@ -1089,3 +1089,4 @@ ca: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/cs.yml config/locales/cs.yml index 81870f8..c143cc1 100644 --- config/locales/cs.yml +++ config/locales/cs.yml @@ -1091,3 +1091,5 @@ cs: field_closed_on: Uzavřeno setting_default_projects_tracker_ids: Výchozí fronta pro nové projekty label_total_time: Celkem + + setting_public_versions: Shared versions visible to non members diff --git config/locales/da.yml config/locales/da.yml index 48a94fe..9e61224 100644 --- config/locales/da.yml +++ config/locales/da.yml @@ -1104,3 +1104,4 @@ da: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/de.yml config/locales/de.yml index 75796c4..4260ab7 100644 --- config/locales/de.yml +++ config/locales/de.yml @@ -1099,3 +1099,5 @@ de: warning_attachments_not_saved: "%{count} Datei(en) konnten nicht gespeichert werden." label_total_time: Gesamtzeit + + setting_public_versions: Shared versions visible to non members diff --git config/locales/el.yml config/locales/el.yml index ba00cae..39c200e 100644 --- config/locales/el.yml +++ config/locales/el.yml @@ -1087,3 +1087,4 @@ el: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/en-GB.yml config/locales/en-GB.yml index d285440..cad5302 100644 --- config/locales/en-GB.yml +++ config/locales/en-GB.yml @@ -1089,3 +1089,4 @@ en-GB: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Total + setting_public_versions: Shared versions visible to non members diff --git config/locales/en.yml config/locales/en.yml index 8927d5b..70bb45a 100644 --- config/locales/en.yml +++ config/locales/en.yml @@ -401,6 +401,7 @@ en: setting_non_working_week_days: Non-working days setting_jsonp_enabled: Enable JSONP support setting_default_projects_tracker_ids: Default trackers for new projects + setting_public_versions: Shared versions visible to non members permission_add_project: Create project permission_add_subprojects: Create subprojects diff --git config/locales/es.yml config/locales/es.yml index 2ec4fef..ea36e48 100644 --- config/locales/es.yml +++ config/locales/es.yml @@ -1123,3 +1123,4 @@ es: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Total + setting_public_versions: Shared versions visible to non members diff --git config/locales/et.yml config/locales/et.yml index 0764b47..458cf01 100644 --- config/locales/et.yml +++ config/locales/et.yml @@ -1100,3 +1100,4 @@ et: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: "Kokku" + setting_public_versions: Shared versions visible to non members diff --git config/locales/eu.yml config/locales/eu.yml index e0aa831..2925ef3 100644 --- config/locales/eu.yml +++ config/locales/eu.yml @@ -1088,3 +1088,4 @@ eu: label_total_time: Guztira text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. + setting_public_versions: Shared versions visible to non members diff --git config/locales/fa.yml config/locales/fa.yml index d31c1f7..b2994a3 100644 --- config/locales/fa.yml +++ config/locales/fa.yml @@ -1089,3 +1089,4 @@ fa: label_total_time: جمله text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. + setting_public_versions: Shared versions visible to non members diff --git config/locales/fi.yml config/locales/fi.yml index 97564e7..907c075 100644 --- config/locales/fi.yml +++ config/locales/fi.yml @@ -1108,3 +1108,4 @@ fi: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/fr.yml config/locales/fr.yml index dcd8cf1..eaa4bbf 100644 --- config/locales/fr.yml +++ config/locales/fr.yml @@ -1100,3 +1100,5 @@ fr: setting_repositories_encodings: Encodages des fichiers et des dépôts label_search_for_watchers: Rechercher des observateurs text_repository_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et underscore sont autorisés.
Un fois sauvegardé, l''identifiant ne pourra plus être modifié.' + + setting_public_versions: Shared versions visible to non members diff --git config/locales/gl.yml config/locales/gl.yml index ca14126..b64da7d 100644 --- config/locales/gl.yml +++ config/locales/gl.yml @@ -1098,3 +1098,4 @@ gl: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/he.yml config/locales/he.yml index c7ace5a..4881400 100644 --- config/locales/he.yml +++ config/locales/he.yml @@ -1092,3 +1092,4 @@ he: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/hr.yml config/locales/hr.yml index 26274f7..07163c1 100644 --- config/locales/hr.yml +++ config/locales/hr.yml @@ -1088,3 +1088,4 @@ hr: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/hu.yml config/locales/hu.yml index 4ffe751..2ab2d46 100644 --- config/locales/hu.yml +++ config/locales/hu.yml @@ -1106,3 +1106,4 @@ label_total_time: Összesen text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. + setting_public_versions: Shared versions visible to non members diff --git config/locales/id.yml config/locales/id.yml index 5dc5afe..3df6979 100644 --- config/locales/id.yml +++ config/locales/id.yml @@ -1091,3 +1091,4 @@ id: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/it.yml config/locales/it.yml index e545955..0efeb85 100644 --- config/locales/it.yml +++ config/locales/it.yml @@ -1088,3 +1088,4 @@ it: field_closed_on: Chiuso il setting_default_projects_tracker_ids: Tracker di default per nuovi progetti label_total_time: Totale + setting_public_versions: Versioni condivise visibili a non membri diff --git config/locales/ja.yml config/locales/ja.yml index bbf9754..82d09e2 100644 --- config/locales/ja.yml +++ config/locales/ja.yml @@ -1116,3 +1116,5 @@ ja: field_inherit_members: メンバーを継承 field_closed_on: 終了日 label_total_time: 合計 + + setting_public_versions: Shared versions visible to non members diff --git config/locales/ko.yml config/locales/ko.yml index eeec637..2492b33 100644 --- config/locales/ko.yml +++ config/locales/ko.yml @@ -1136,3 +1136,5 @@ ko: field_closed_on: 완료일 setting_default_projects_tracker_ids: 새 프로젝트에 기본적으로 추가할 일감 유형 label_total_time: 합계 + + setting_public_versions: Shared versions visible to non members diff --git config/locales/lt.yml config/locales/lt.yml index e3522dc..e422247 100644 --- config/locales/lt.yml +++ config/locales/lt.yml @@ -1146,3 +1146,5 @@ lt: label_total_time: Iš viso text_scm_config: Jūs galite pakeisti SCM komandas byloje config/configuration.yml. Prašome perkrauti programą po redagavimo, idant įgalinti pakeitimus. text_scm_command_not_available: SCM komanda nepasiekiama. Patikrinkite administravimo skydelio nustatymus. + + setting_public_versions: Shared versions visible to non members diff --git config/locales/lv.yml config/locales/lv.yml index 9c3de74..364039a 100644 --- config/locales/lv.yml +++ config/locales/lv.yml @@ -1081,3 +1081,4 @@ lv: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/mk.yml config/locales/mk.yml index 61b219c..bc3c835 100644 --- config/locales/mk.yml +++ config/locales/mk.yml @@ -1087,3 +1087,4 @@ mk: text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_footer: Email footer setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/mn.yml config/locales/mn.yml index 3598693..d5b2641 100644 --- config/locales/mn.yml +++ config/locales/mn.yml @@ -1088,3 +1088,4 @@ mn: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/nl.yml config/locales/nl.yml index 6afc237..801fdd3 100644 --- config/locales/nl.yml +++ config/locales/nl.yml @@ -1068,3 +1068,4 @@ nl: setting_default_projects_tracker_ids: Standaard trackers voor nieuwe projecten label_total_time: Totaal setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/no.yml config/locales/no.yml index e2249c5..74cbb70 100644 --- config/locales/no.yml +++ config/locales/no.yml @@ -1077,3 +1077,4 @@ field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Totalt + setting_public_versions: Shared versions visible to non members diff --git config/locales/pl.yml config/locales/pl.yml index c9ff4dd..d19faf0 100644 --- config/locales/pl.yml +++ config/locales/pl.yml @@ -1108,3 +1108,4 @@ pl: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/pt-BR.yml config/locales/pt-BR.yml index 0752e84..a9e7ad6 100644 --- config/locales/pt-BR.yml +++ config/locales/pt-BR.yml @@ -1107,3 +1107,5 @@ pt-BR: field_closed_on: Fechado setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Total + + setting_public_versions: Shared versions visible to non members diff --git config/locales/pt.yml config/locales/pt.yml index 5deff0a..2dc973b 100644 --- config/locales/pt.yml +++ config/locales/pt.yml @@ -1093,3 +1093,5 @@ pt: field_closed_on: Fechado setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Total + + setting_public_versions: Shared versions visible to non members diff --git config/locales/ro.yml config/locales/ro.yml index 6f72e7b..5f91367 100644 --- config/locales/ro.yml +++ config/locales/ro.yml @@ -1082,3 +1082,4 @@ ro: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/ru.yml config/locales/ru.yml index 634b577..f57082a 100644 --- config/locales/ru.yml +++ config/locales/ru.yml @@ -1197,3 +1197,5 @@ ru: field_closed_on: Закрыта setting_default_projects_tracker_ids: Трекеры по умолчанию для новых проектов label_total_time: Общее время + + setting_public_versions: Shared versions visible to non members diff --git config/locales/sk.yml config/locales/sk.yml index f8924c8..7ffec0b 100644 --- config/locales/sk.yml +++ config/locales/sk.yml @@ -1084,3 +1084,4 @@ sk: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/sl.yml config/locales/sl.yml index 8c6e22b..7b858d9 100644 --- config/locales/sl.yml +++ config/locales/sl.yml @@ -1087,3 +1087,4 @@ sl: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Skupaj + setting_public_versions: Shared versions visible to non members diff --git config/locales/sq.yml config/locales/sq.yml index 05e5a6f..962c943 100644 --- config/locales/sq.yml +++ config/locales/sq.yml @@ -1083,3 +1083,4 @@ sq: text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_footer: Email footer setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/sr-YU.yml config/locales/sr-YU.yml index 3b53e6e..1e11bed 100644 --- config/locales/sr-YU.yml +++ config/locales/sr-YU.yml @@ -1089,3 +1089,4 @@ sr-YU: label_total_time: Ukupno text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. + setting_public_versions: Shared versions visible to non members diff --git config/locales/sr.yml config/locales/sr.yml index f5573c9..9533d38 100644 --- config/locales/sr.yml +++ config/locales/sr.yml @@ -1088,3 +1088,4 @@ sr: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/sv.yml config/locales/sv.yml index c124e2e..01c8c41 100644 --- config/locales/sv.yml +++ config/locales/sv.yml @@ -1125,3 +1125,5 @@ sv: description_date_from: Ange startdatum description_date_to: Ange slutdatum text_repository_identifier_info: 'Endast gemener (a-z), siffror, streck och understreck är tillåtna.
När identifieraren sparats kan den inte ändras.' + + setting_public_versions: Shared versions visible to non members diff --git config/locales/th.yml config/locales/th.yml index a7e1255..feab880 100644 --- config/locales/th.yml +++ config/locales/th.yml @@ -1084,3 +1084,4 @@ th: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/tr.yml config/locales/tr.yml index 757af1a..9e9c7bc 100644 --- config/locales/tr.yml +++ config/locales/tr.yml @@ -1106,3 +1106,4 @@ tr: label_total_time: Toplam text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. + setting_public_versions: Shared versions visible to non members diff --git config/locales/uk.yml config/locales/uk.yml index ddfd3ff..52ceac0 100644 --- config/locales/uk.yml +++ config/locales/uk.yml @@ -1082,3 +1082,4 @@ uk: text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. setting_emails_header: Email header + setting_public_versions: Shared versions visible to non members diff --git config/locales/vi.yml config/locales/vi.yml index 8703db8..a28f16e 100644 --- config/locales/vi.yml +++ config/locales/vi.yml @@ -1140,3 +1140,5 @@ vi: field_closed_on: Đã đóng setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: Tổng cộng + + setting_public_versions: Shared versions visible to non members diff --git config/locales/zh-TW.yml config/locales/zh-TW.yml index 196b0ce..bdbf452 100644 --- config/locales/zh-TW.yml +++ config/locales/zh-TW.yml @@ -1169,3 +1169,5 @@ description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。' label_total_time: 總計 + + setting_public_versions: Shared versions visible to non members diff --git config/locales/zh.yml config/locales/zh.yml index cb358c2..e93d62f 100644 --- config/locales/zh.yml +++ config/locales/zh.yml @@ -1091,3 +1091,4 @@ zh: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: 合计 + setting_public_versions: Shared versions visible to non members diff --git config/settings.yml config/settings.yml index 0c9f270..1fd232b 100644 --- config/settings.yml +++ config/settings.yml @@ -230,3 +230,5 @@ non_working_week_days: default: - '6' - '7' +public_versions: + default: 1