amartel / redmine_webdav

WebDav plugin for redmine
Other
35 stars 8 forks source link

Included lite version of redmine_http_auth plugin is incompatible with Redmine 2.x #15

Closed Sethur closed 11 years ago

Sethur commented 11 years ago

Hi,

I just tried to install this with Redmine 2.1.2 on Ubuntu 12.04 LTS running Apache2 and Passenger. I came as far as finding out that you have to replace the Digest:SHA1 with Digest:SHA in RedmineAdvanced.pm with Ubuntu 12.04 since libdigest-sha1-perl is no longer provided.

However, I am stuck now with both the full version and the mini/lite version of the http_auth plugin. Although your trunk is allegedly compatible with Redmine 2.1.2 at the moment, the mini version of redmine_http_auth isn't which impedes the entire functionality.

Any insights on how to migrate redmine_http_auth to Redmine 2 are most welcome.

Thanks,

Tristan

amartel commented 11 years ago

Hi,

Please, could you give more details about your problem? I'm currently using the "light" version of redmine_http_auth plugin and I don't have any error with my redmine servers (trunk version r10442)...

Kind regards, Arnaud

Sethur commented 11 years ago

Hi Arnaud,

the problem is that the (HEAD) supplied lite version of redmine_http_auth (redmine_webdav/extra/redmine_http_auth.tgz) is not compatible with redmine 2.x.

I just managed (was not very hard, I'm just not good with rails) to get it running though by manually "migrating" redmine_http_auth/init.rb to a redmine_2.x compatible form, i.e. the code now looks like this:

require 'redmine'
#require 'dispatcher'
require 'http_auth_patch'

Redmine::Plugin.register :redmine_http_auth do
  name 'HTTP Authentication plugin'
  author 'Adam Lantos/A. Martel'
  description 'A plugin for doing HTTP authentication'
  version '0.3.0-dev'
end

#Dispatcher.to_prepare do
ActionDispatch::Callbacks.to_prepare do
  #include our code
  ApplicationController.send(:include, HTTPAuthPatch)
end
Sethur commented 11 years ago

Thank you for you very nice work, by the way, it's exactly what I needed.

amartel commented 11 years ago

OK. You're right and I missed that I updated init.rb file on my server ;-) I'll commit asap the correct .tgz file

Thank's for the feedback

Arnaud