Defect #28000 » show-ldap-deletion-error-v3.diff
app/controllers/auth_sources_controller.rb (working copy) | ||
---|---|---|
68 | 68 |
unless @auth_source.users.exists? |
69 | 69 |
@auth_source.destroy |
70 | 70 |
flash[:notice] = l(:notice_successful_delete) |
71 |
else |
|
72 |
flash[:error] = l(:error_can_not_delete_auth_source) |
|
71 | 73 |
end |
72 | 74 |
redirect_to auth_sources_path |
73 | 75 |
end |
config/locales/en.yml (working copy) | ||
---|---|---|
221 | 221 |
error_cannot_reassign_time_entries_to_an_issue_about_to_be_deleted: "Spent time cannot be reassigned to an issue that is about to be deleted" |
222 | 222 |
warning_fields_cleared_on_bulk_edit: "Changes will result in the automatic deletion of values from one or more fields on the selected objects" |
223 | 223 |
error_exceeds_maximum_hours_per_day: "Cannot log more than %{max_hours} hours on the same day (%{logged_hours} hours have already been logged)" |
224 |
error_can_not_delete_auth_source: "This authentication mode is in use and cannot be deleted." |
|
224 | 225 | |
225 | 226 |
mail_subject_lost_password: "Your %{value} password" |
226 | 227 |
mail_body_lost_password: 'To change your password, click on the following link:' |
test/functional/auth_sources_controller_test.rb (working copy) | ||
---|---|---|
159 | 159 |
:id => 1 |
160 | 160 |
} |
161 | 161 |
assert_redirected_to '/auth_sources' |
162 |
assert_equal 'This authentication mode is in use and cannot be deleted.', flash[:error] |
|
162 | 163 |
end |
163 | 164 |
end |
164 | 165 |
- « Previous
- 1
- 2
- 3
- Next »