##// END OF EJS Templates
Merged r15740 and r15748 (#23410)....
Jean-Philippe Lang -
r15386:e9370c3fce05
parent child
Show More
@@ -489,6 +489,9 class IssuesController < ApplicationController
489 render_error l(:error_no_default_issue_status)
489 render_error l(:error_no_default_issue_status)
490 return false
490 return false
491 end
491 end
492 elsif request.get?
493 render_error :message => l(:error_no_projects_with_tracker_allowed_for_new_issue), :status => 403
494 return false
492 end
495 end
493
496
494 @priorities = IssuePriority.active
497 @priorities = IssuePriority.active
@@ -214,6 +214,7 en:
214 error_attachment_extension_not_allowed: "Attachment extension %{extension} is not allowed"
214 error_attachment_extension_not_allowed: "Attachment extension %{extension} is not allowed"
215 error_ldap_bind_credentials: "Invalid LDAP Account/Password"
215 error_ldap_bind_credentials: "Invalid LDAP Account/Password"
216 error_no_tracker_allowed_for_new_issue_in_project: "The project doesn't have any trackers for which you can create an issue"
216 error_no_tracker_allowed_for_new_issue_in_project: "The project doesn't have any trackers for which you can create an issue"
217 error_no_projects_with_tracker_allowed_for_new_issue: "There are no projects with trackers for which you can create an issue"
217
218
218 mail_subject_lost_password: "Your %{value} password"
219 mail_subject_lost_password: "Your %{value} password"
219 mail_body_lost_password: 'To change your password, click on the following link:'
220 mail_body_lost_password: 'To change your password, click on the following link:'
@@ -234,6 +234,7 fr:
234 error_attachment_extension_not_allowed: "L'extension %{extension} n'est pas autorisée"
234 error_attachment_extension_not_allowed: "L'extension %{extension} n'est pas autorisée"
235 error_ldap_bind_credentials: "Identifiant ou mot de passe LDAP incorrect"
235 error_ldap_bind_credentials: "Identifiant ou mot de passe LDAP incorrect"
236 error_no_tracker_allowed_for_new_issue_in_project: "Le projet ne dispose d'aucun tracker sur lequel vous pouvez créer une demande"
236 error_no_tracker_allowed_for_new_issue_in_project: "Le projet ne dispose d'aucun tracker sur lequel vous pouvez créer une demande"
237 error_no_projects_with_tracker_allowed_for_new_issue: "Aucun projet ne dispose d'un tracker sur lequel vous pouvez créer une demande"
237
238
238 mail_subject_lost_password: "Votre mot de passe %{value}"
239 mail_subject_lost_password: "Votre mot de passe %{value}"
239 mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :'
240 mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :'
@@ -1900,6 +1900,24 class IssuesControllerTest < ActionController::TestCase
1900 assert_response 403
1900 assert_response 403
1901 end
1901 end
1902
1902
1903 def test_new_without_projects_should_respond_with_403
1904 Project.delete_all
1905 @request.session[:user_id] = 2
1906
1907 get :new
1908 assert_response 403
1909 assert_select_error /no projects/
1910 end
1911
1912 def test_new_without_enabled_trackers_on_projects_should_respond_with_403
1913 Project.all.each {|p| p.trackers.clear }
1914 @request.session[:user_id] = 2
1915
1916 get :new
1917 assert_response 403
1918 assert_select_error /no projects/
1919 end
1920
1903 def test_new_should_preselect_default_version
1921 def test_new_should_preselect_default_version
1904 version = Version.generate!(:project_id => 1)
1922 version = Version.generate!(:project_id => 1)
1905 Project.find(1).update_attribute :default_version_id, version.id
1923 Project.find(1).update_attribute :default_version_id, version.id
General Comments 0
You need to be logged in to leave comments. Login now