Skip to content
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

Redmine 2.x Update #18

Open
darksoul42 opened this issue Nov 12, 2012 · 8 comments
Open

Redmine 2.x Update #18

darksoul42 opened this issue Nov 12, 2012 · 8 comments

Comments

@darksoul42
Copy link

I coded the following patch to enable redmine_http_auth to be used with Redmine 2.x (at work, with an Apache 2.x + mod_ldap setup). Tested on Redmine 2.1.2 with Rails 3.2.8

The patch itself :
http://www.yomi.darkbsd.org/~darksoul/redmine_http_auth-for-redmine-2x.patch

The patched archive (from master branch) :
http://www.yomi.darkbsd.org/~darksoul/redmine_http_auth-for-redmine-2x.tar.gz

The patch includes :

  • Routes remade in Rails 3 style :
    • Style change : Routes.draw |map| ... end -> RedmineApp::Application.routes. draw do match ... end
  • Application initialization remade in Rails 3 style
    • Style change : Dispatcher.to_prepare -> RedmineApp::Application.config.after_initialize
    • Explicit requires replaced with implicit ones
  • Created a RedmineHttpAuth module to take advantage of implicit module file inclusion
    • Class structure : the application controller is now made to include RedmineHttpAuth::HTTPAuthPatch instead of directly including HTTPAuthPatch
    • Include style : protection from double includes
kevinfoote added a commit to kevinfoote/redmine_http_auth that referenced this issue Nov 16, 2012
@ghost
Copy link

ghost commented Jan 21, 2013

Thanks a lot for your effort darksoul42! I can manage to make the login work again with your patch, however the autoregistration form still raises errors:

NameError (undefined local variable or method httpauthselfregister_url' for #<WelcomeController:0xbc385d8>): app/controllers/application_controller.rb:84:inuser_setup'

If I access /httpauth-selfregister directly (as in previous versions) I get some exception:
ActionController::RoutingError (No route matches {:action=>"register", :controller=>"registration"}):

Same with redmine 2.1.x and 2.2.x.

stopfstedt added a commit to stopfstedt/redmine_http_auth that referenced this issue Jan 21, 2013
@ghost
Copy link

ghost commented Feb 1, 2013

Does anybody of the active users have the scenario where self-register is enabled? Perhabs we could work together to make this 2.x compliant. Any help would be appreciated.

With all my changes I could prevent the exception, but the httpauthselfregister-page shows up just empty without a form.

[Or even worse: Is this problem not arising on your installations with self-register enabled?]

@kevinfoote
Copy link

jpmschuler ... I am actively using self-register, Yes..

I will see what I have for routes .. I might have had to change something local that is not in the code..

@froid1911
Copy link

👍

ma-ku added a commit to ma-ku/redmine_http_auth that referenced this issue Apr 16, 2013
Continued fixing minor issues brought up on issue AdamLantos#18.
- Self-Registration form is working (although it is not used by my installations)
- Logout now returns to login screen allowing the user to change identity
- Locked users cannot log in
@jendamek
Copy link

Hi,

I tried to install your plugin, but I am still getting the following error:

ActionController::RoutingError (No route matches {:controller=>"httpauth-login"}):
lib/redmine/menu_manager.rb:150:in render_single_menu_node' lib/redmine/menu_manager.rb:102:inrender_menu_node'
lib/redmine/menu_manager.rb:91:in block in render_menu' lib/redmine/menu_manager.rb:168:inblock in menu_items_for'
lib/redmine/menu_manager.rb:165:in each' lib/redmine/menu_manager.rb:165:inmenu_items_for'
lib/redmine/menu_manager.rb:90:in render_menu' app/views/layouts/base.html.erb:23:in_app_views_layouts_base_html_erb___134226875744948074_34903060'

Sadly, I dont know anything about Rails, so I dont know, how to fix this problem. Could anyone please point me in the right direction?

Best regards

Jan Mach

@phlegx
Copy link

phlegx commented Apr 9, 2015

@ghost I get the same error as you:

NameError (undefined local variable or method `httpauthselfregister_url' for #<WelcomeController:0x000000079849f8>):
  app/controllers/application_controller.rb:100:in `user_setup'

Any idea?

@KingBain
Copy link

@phlegx Having the same issue ... were you able to resolve it ?

@phlegx
Copy link

phlegx commented Apr 27, 2015

@KingBain Some forks has fix the problem.
This fork works for me: https://github.com/tdobrovolskij/redmine_http_auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants