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

Can't login after upgrade Redmine version #87

Open
swood opened this issue Jan 21, 2020 · 2 comments
Open

Can't login after upgrade Redmine version #87

swood opened this issue Jan 21, 2020 · 2 comments

Comments

@swood
Copy link

swood commented Jan 21, 2020

Hello.

There is something wrong after I upgraded my Redmine version.
I re-installed all plugins from the old version, however, some users can't log in due to error below:

Completed 500 Internal Server Error in 6ms (ActiveRecord: 1.4ms)

NoMethodError (undefined method `authenticate' for nil:NilClass):

app/models/user.rb:332:in `check_password?'
app/models/user.rb:232:in `try_to_login'
plugins/redmine_2fa/lib/redmine_two_fa/patches/account_controller_patch/second_authentication_prepare.rb:8:in `password_authentication'
app/controllers/account_controller.rb:213:in `authenticate_user'
app/controllers/account_controller.rb:40:in `login'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'

Could you please help to fix this problem, because it looks like the plugin redmine_2fa have some role in this problem.

@vladislav-yashin
Copy link
Contributor

Quick fix (run in rails console):

User.where.not(auth_source_id: nil).each { |u| u.update_column(:auth_source_id, nil) unless u.auth_source }

Please, let me know if it works for you.

There're will be compensational migration in the next version of plugin.

@swood
Copy link
Author

swood commented Jan 21, 2020

Unfortunately, no, this is didn't change the behaviour.

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

2 participants