twinslash / redmine_omniauth_google

This plugin is used to authenticate in redmine through Google.
http://www.redmine.org/plugins/redmine_omniauth_google
95 stars 103 forks source link

Update redmine_oauth_controller.rb #13

Open prattmic opened 10 years ago

prattmic commented 10 years ago

for Redmine 2.5.x

gotva commented 10 years ago

:thumbsup: Thank you very much!

@xandercage please pay attention that starting from version 2.4 core code for account_pending has been changed: version 2.3 and before without user version 2.4 and version 2.5 with user.

I would like to say the plugin should be splitted to support different Redmine versions and this PR should be accepted for last versions (2.4, 2.5).

Not sure but maybe it solves https://github.com/twinslash/redmine_omniauth_google/issues/11

prattmic commented 10 years ago

Is there a way to query the Redmine version? If so, we could just add a version check here and call the appropriate version of the function.

gotva commented 10 years ago

good point

Sorry I can't check it myself now, but I think it is possible.

Look at this and compare 2.3 2.4 2.5

Constants MAJOR, MINOR, TINY correspond to versions for example current version for 2.5 is

    MAJOR = 2
    MINOR = 5
    TINY  = 2

it is 2.5.2

gotva commented 10 years ago

@xandercage this PR should be closed withut merging because another PR (https://github.com/twinslash/redmine_omniauth_google/pull/14) with supporting all Redmine versions were added.