-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compatibility redmine 2.x #11
Comments
what about the logout ? :) |
Hi, unfortunately we don't have now the resources to update this plugin for redmine 2.x. moreover, we think that a better approach is to use omniauth, as its cas provider works very well and doesn't require the outdated casclient. as you managed to work around the issues, can you try out omniauth and omniauth-cas, and cook a pull request? we'd be then happy to test it and merge it afterwards. only, try to avoid copying other libraries files, it's better to require them as dependencies. thanks, ~Marcello (via iPhone) ~ [email protected] On Sep 28, 2012, at 11:59 AM, Vysserk [email protected] wrote:
|
Hello,
I tried to use this plugin in this environment :
Redmine version 2.0.3.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.6
So first I would like to ask if we could have an update of this plugin for redmine 2.x, please ?
Now to help the other users, I will explain how I fixed the problems I encoutered :
4 things to fix.
1) In my environment, the plugin did not load casclient.
I always have the error :
/var/lib/gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require': no such file to load -- casclient (LoadError)
So I copied the content of the repository :
/var/lib/gems/1.8/gems/rubycas-client-2.3.9/lib
in :
${REDMINE_PATH}/plugins/redmine_cas/lib/
2) Another problem :
${REDMINE_PATH}/plugins/ifad-redmine-cas-plugin-c9c0d6a/lib/redmine_cas.rb:155: uninitialized constant ActionController::Dispatcher (NameError)
This is a RAILS 3.x libraries problem, the function "ActionController::Dispatcher" doesn't exist any more.
To fix that, I change in the file "${REDMINE_PATH}/plugins/redmine_cas/lib/redmine_cas.rb :
Next to that, we can successfully see the main page of redmine.
But, there are still problems with the "login_without_cas".
3) When the option "login_without_cas" is enabled, the whole redmine become unavailable.
In the logs :
ActionController::RoutingError (No route matches {:controller=>"account", :action=>"login_without_cas"}):
lib/redmine/menu_manager.rb:150:in
render_single_menu_node' lib/redmine/menu_manager.rb:102:in
render_menu_node'lib/redmine/menu_manager.rb:91:in
render_menu' lib/redmine/menu_manager.rb:168:in
menu_items_for'lib/redmine/menu_manager.rb:165:in
each' lib/redmine/menu_manager.rb:165:in
menu_items_for'lib/redmine/menu_manager.rb:90:in
render_menu' app/views/layouts/base.html.erb:29:in
_app_views_layouts_base_html_erb__776016318_70003952580540'To fix that, I added a new route in the file "${REDMINE_PATH}/config/routes.rb" :
(I added it between login et logout)
4) With that, Redmine becomes available but the link "login_without_cas" doesn't work.
Redmin show a "Internal error" page.
In the logs :
ActionView::Template::Error (uninitialized constant ActionView::CompiledTemplates::RAILS_ROOT):
1: <%= render :file => "#{RAILS_ROOT}/app/views/account/login.rhtml" %>
plugins/redmine_cas/app/views/account/login_without_cas.html.erb:1:in `_plugins_redmine_cas_app_views_account_login_without_cas_html_erb___654617792_69995100736760'
By try and error, I discovered that Redmine searches the template "#{RAILS_ROOT}/app/views/account/login.rhtml" in :
So it is not important to set "RAILS_ROOT" when a simple modification like below is enough.
{RAILS_ROOT}/app/views/account/login.rhtml -> account/login.html.erb
(login.rhtml has been remplaced by login.html.erb)
Now that works fine :)
The text was updated successfully, but these errors were encountered: