Defect #20997

Redmine 3.1.1 API Rest and my account page

Added by Franck Samson almost 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Accounts / authentication
Target version:-
Resolution: Affected version:3.1.1

Description

Hello,
I use the latest version of redmine and when the API Rest is activated, I can't go to my account page I ve got this error :

Started GET "/redmine/my/account" for  at 2015-10-15 10:43:30 +0200
Processing by MyController#account as HTML
  Current user: ccc (id=5)
  Rendered users/_mail_notifications.html.erb (17.4ms)
  Rendered users/_preferences.html.erb (5.3ms)
  Rendered my/_sidebar.html.erb (4.7ms)
  Rendered my/account.html.erb within layouts/base (39.3ms)
Completed 500 Internal Server Error in 51ms (ActiveRecord: 4.5ms)

ActionView::Template::Error (No route matches {:action=>"show_api_key", :controller=>"my"}):
    21: <% if Setting.rest_api_enabled? %>
    22: <h4><%= l(:label_api_access_key) %></h4>
    23: <div>
    24:   <%= link_to l(:button_show), {:action => 'show_api_key'}, :remote => true %>
    25:   <pre id='api-access-key' class='autoscroll'></pre>
    26: </div>
    27: <%= javascript_tag("$('#api-access-key').hide();") %>
  app/views/my/_sidebar.html.erb:24:in `_app_views_my__sidebar_html_erb___3604902527302737899_70242405852180'
  app/views/my/account.html.erb:56:in `block in _app_views_my_account_html_erb__883336876389597527_70242404894200'
  app/views/my/account.html.erb:55:in `_app_views_my_account_html_erb__883336876389597527_70242404894200'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

If the Rest Api is deactivated there is no probleme...

Thank for help

Associated revisions

Revision 14677
Added by Jean-Philippe Lang almost 5 years ago

Named routed for RSS/API keys (#20997).

History

#1 Updated by Jean-Philippe Lang almost 5 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang

I can not reproduce this error.
I've changed this with named routes in r14677 anyway, this routing error should no longer happen.

#2 Updated by zhixin wen almost 5 years ago

Same problem, solved with your changed r14677, thanks!

#3 Updated by Toshi MARUYAMA almost 5 years ago

  • Description updated (diff)

Also available in: Atom PDF