Commit Graph

63 Commits

Author SHA1 Message Date
Jean-Philippe Lang 6b47cad8ce Cleanup in TimelogController#destroy.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9095 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-04 15:24:14 +00:00
Jean-Philippe Lang dc50edae5e Adds a template for API error messages so that it does not depend on AR::Errors serialization.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9094 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-04 15:16:50 +00:00
Jean-Philippe Lang 8cfc080470 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8953 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-23 15:28:49 +00:00
Jean-Philippe Lang 3be511cdab Removed dead code.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8951 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-23 15:23:03 +00:00
Toshi MARUYAMA d4d27bd2d8 Ruby1.9: skip enforcing UTF-8 encodings on the params hash on Rails2 if it is frozen (#4050, #4796)
Tests on CI server fail.
http://www.redmine.org/builds/build_trunk-1.9.2-sqlite3_257.html

<pre>
  1) Error:
test_index_with_short_filters(IssuesControllerTest):
RuntimeError: can't modify frozen string
    /var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:58:in `force_encoding'
    /var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:58:in `utf8nize!'
    /var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:60:in `block in utf8nize!'
    /var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:60:in `each'
    /var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:60:in `utf8nize!'
    /var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:52:in `params_filter'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:178:in `evaluate_method'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:166:in `call'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:225:in `call'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:629:in `run_before_filters'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:615:in `call_filters'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
    /var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/core_ext/benchmark.rb:17:in `block in ms'
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8716 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-28 10:26:34 +00:00
Toshi MARUYAMA 24d73d4644 Ruby1.9: enforce UTF-8 encodings on the params hash on Rails2 (#4050, #4796)
Without this change, non ASCII subject issue cannot be created on Ruby 1.9.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8714 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-28 04:58:11 +00:00
Jean-Philippe Lang 361c059a6f Removed unused method.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7980 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-29 18:15:27 +00:00
Jean-Philippe Lang b7d0ee3f47 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7979 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-29 18:14:12 +00:00
Jean-Philippe Lang f45fc1a1ba Removed a useless rescue.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7978 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-29 18:11:59 +00:00
Jean-Philippe Lang 053adaef52 Adds API response to /trackers to get the list of all available trackers (#7181).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7877 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-20 14:17:43 +00:00
Toshi MARUYAMA 2a27cc41f0 remove hard-coded '.rxml' from ApplicationController 'render_feed' (#6317)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7573 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-04 11:07:47 +00:00
Toshi MARUYAMA 59849253dd remove trailing white-spaces from app/controllers/application_controller.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6525 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-22 13:29:48 +00:00
Jean-Philippe Lang b81149fa47 Remove autologin cookie on unverified request.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6316 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-25 21:15:09 +00:00
Jean-Philippe Lang 130b71d121 Sets forgery protection filter first.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6315 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-25 21:02:27 +00:00
Jean-Philippe Lang 621850d5a0 Typo in api_key_auth deprecation code (#8773).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6208 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-09 18:48:34 +00:00
Jean-Philippe Lang 93c2b92a4b Separation of RSS/API auth actions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6197 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-09 08:56:07 +00:00
Jean-Philippe Lang c8b627dfc7 Mitigates vulnerability in API authentication introduced in r3218.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6187 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-06 19:02:58 +00:00
Jean-Philippe Lang 8914d323ee Fixed: private queries should not be accessible to other users (#8729).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6163 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-03 11:01:08 +00:00
Toshi MARUYAMA 092cfc0229 remove trailing white-spaces from app/controllers/application_controller.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5749 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-12 04:25:47 +00:00
Toshi MARUYAMA ed7091cda1 Fix potential Execution After Redirect bugs.
Execution After Redirect (EAR) happens when redirect in a controller is
triggered but there still is code that is executed in the action.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5611 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-01 23:15:03 +00:00
Jean-Philippe Lang aa0d01b3d9 Adds an issues visibility level on roles (#7412).
It can be set so that users only see their own issues (created or assigned).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5416 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-11 17:53:15 +00:00
Jean-Philippe Lang 07fe46e9df Makes the API accepts the X-Redmine-API-Key header to hold the API key.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4573 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-23 14:49:14 +00:00
Jean-Philippe Lang d076c19822 Makes API accept offset/limit or page/limit parameters for retrieving collections.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4571 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-23 13:33:01 +00:00
Jean-Philippe Lang 00d50157d3 Restores object count and adds offset/limit attributes to API responses for paginated collections (#6140).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4489 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-11 13:13:49 +00:00
Jean-Philippe Lang 224921460a Adds a pseudo format to api template names and overrides ActionController#default_template so that api templates are chosen automatically.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4466 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-04 17:43:39 +00:00
Jean-Philippe Lang d0a3aab2e7 Adds a reusable method to render API response on validation failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4455 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-03 11:51:06 +00:00
Jean-Philippe Lang 96ce0f017c Adds a builder-like template system for rendering xml and json API responses.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4452 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-03 11:25:21 +00:00
Jean-Philippe Lang 7824eca775 Refactor: merged error rendering methods.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4286 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-10-23 11:07:04 +00:00
Jean-Philippe Lang eea456ed84 Improved error message when trying to access an archived project (#2995).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4285 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-10-23 09:48:01 +00:00
Jean-Baptiste Barth b255b7760a Added ability to delete issues from different projects through contextual menu (#5332)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4236 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-10-07 05:11:28 +00:00
Jean-Baptiste Barth 4853dd97fd Splitted #find_issues filter in ApplicationController to #find_issues and #check_project_uniqueness (#5332)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4228 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-09-29 05:22:53 +00:00
Eric Davis 3a2efb4757 Refactor: convert ProjectEnumerations to a resource on a project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4075 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-09-10 16:00:49 +00:00
Eric Davis 73ba49a715 Use the base layout for all 403, 404, and 500 pages. #6172
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3949 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 01:01:35 +00:00
Eric Davis 13fe01a185 Refactor: pull up method to ApplicationController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3940 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-13 14:59:04 +00:00
Eric Davis f18b126fba Refactor: Pull up method to ApplicationController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3938 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-12 13:57:51 +00:00
Eric Davis 8c79385261 Refactor: extract back_url method to ApplicationController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3912 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-04 13:37:44 +00:00
Eric Davis 48a5460da4 Allow js formatted responses.
Otherwise they return the invalid format error (406) instead of 403, 404, or 500

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3827 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-05 18:00:50 +00:00
Eric Davis 345301284a Added JSON support to the issues API. #1214
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3766 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-06-05 03:52:59 +00:00
Eric Davis 306ca5e714 Refactor: Pull up #find_optional_project to ApplicationController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3716 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-04-30 17:24:11 +00:00
Jean-Philippe Lang 0d938dff59 Fixed: 500 internal error when browsing any Redmine page in Epiphany (#5401).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3702 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-04-30 10:33:25 +00:00
Eric Davis 488879d9cf Refactor: pull #query_statement_invalid up to ApplicationController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3696 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-04-29 15:19:19 +00:00
Jean-Philippe Lang aa4d1fe816 Fixed: API 401 response does not include WWW-Authenticate header (#5322).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3679 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-04-17 12:45:23 +00:00
Eric Davis 194dab8e96 Refactor: Change the different find_object filters to share a common method.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3597 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-17 15:41:58 +00:00
Eric Davis e6c8760ad7 Refactor: Split the find_object methods to prep for a larger refactoring.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3591 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-16 15:17:47 +00:00
Eric Davis fe1e3ccd18 Refactor: Decouple failed attachments and the flash messages
Attachment#attach_files will no longer need to return a flash message,
instead it will put unsaved attachments into object#unsaved_attachments
where the calling object can access them.

A utility method #render_attachment_warning_if_needed is included for setting
the standard flash warning.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3528 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-03 17:05:00 +00:00
Eric Davis 0fd7e2d696 Refactor: Moved ApplicationController#attach_files to the Attachment model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3523 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-02 19:26:03 +00:00
Eric Davis 9e22faa640 Converted the REDMINE_SUPPORTED_SCM constant to a class
Now SCMs can be added or removed using a simple API, instead of being
hardcoded:

  Redmine::Scm::Base.add('ScmName')
  Redmine::Scm::Base.delete('ScmName')

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3440 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-16 22:41:59 +00:00
Eric Davis e5d300af0a Refactor: Pull up several #find_project methods to ApplicationController
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3370 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-05 16:57:02 +00:00
Jean-Philippe Lang 0ef9bc039d Adds a log message when an API call raises an InvalidAuthenticityToken error.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3332 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-01-17 20:23:06 +00:00
Jean-Philippe Lang 68a4cd38f5 XML REST API for Projects (#296).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3313 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-01-14 20:00:17 +00:00