jbbarth / redmine_omniauth_cas

CAS authentication plugin for Redmine through OmniAuth
MIT License
19 stars 14 forks source link

Fixes, refactoring and new features #5

Open fcrespel opened 11 years ago

fcrespel commented 11 years ago

Hello,

Here are two small fixes for Ruby 1.8 and for the login button URL when Redmine is installed in a subdirectory (e.g. example.org/redmine)

fcrespel commented 11 years ago

While I was at it, I also implemented a few features I needed :

Feel free to pull/cherry-pick/rework this set of commits as you see fit :-)

jbbarth commented 11 years ago

Wow, that's a bunch of work, thanks! I'll try to test everything in the next 2 weeks and then merge it.

jbbarth commented 11 years ago

I cherry-picked 7 of the 8 first commits and pushed them to master.

I don't really understand a0a0bd2 : sure monkey patching is useful in Redmine plugins, but here OmniAuth accepts a proc for being dynamically configured, so I don't really see the point. Plus it changes the behaviour of the original code, which relies on Setting["host_name"] to avoid some reverse-proxy issues. Standard OmniAuth's full_host method has the usual problems in reverse-proxyfied environments IIRC.

The last 3 commits will be added soon but I want to add some tests for them, as the change is a bit more risky and needs to be maintained in future versions. I will post updates here.

Thanks again for all that work on the plugin!