Project

General

Profile

Defect #28000 » show-ldap-deletion-error-v2.diff

Go MAEDA, 2018-01-17 14:26

View differences:

app/controllers/auth_sources_controller.rb (working copy)
unless @auth_source.users.exists?
@auth_source.destroy
flash[:notice] = l(:notice_successful_delete)
else
flash[:error] = l(:error_can_not_delete_auth_source)
end
redirect_to auth_sources_path
end
config/locales/en.yml (working copy)
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"
warning_fields_cleared_on_bulk_edit: "Changes will result in the automatic deletion of values from one or more fields on the selected objects"
error_exceeds_maximum_hours_per_day: "Cannot log more than %{max_hours} hours on the same day (%{logged_hours} hours have already been logged)"
error_can_not_delete_auth_source: "This authentication mode is in use and cannot be deleted."
mail_subject_lost_password: "Your %{value} password"
mail_body_lost_password: 'To change your password, click on the following link:'
test/functional/auth_sources_controller_test.rb (working copy)
:id => 1
}
assert_redirected_to '/auth_sources'
assert_equal I18n.t(:error_can_not_delete_auth_source), flash[:error]
end
end
(2-2/3)