0

I'm having trouble with a redmine plugin, redmine_omniauth_google. When installed in a fresh redmine 4.1.1 as the only plugin, the log shows the following error:

FATAL -- : ArgumentError (Before process_action callback :check_if_login_required has not been defined):

The class hierarchy is:

  ApplicationController       (plugins/redmine_omniauth_google/app/controllers/application_controller.rb)
    AccountController         (app/controllers/account_controller.rb)
      RedmineOAuthController  (app/controllers/redmine_oauth_controller.rb)

check_if_login_required is defined in application_controller.rb

In account_controller.rb I see:

class AccountController < ApplicationController
  ...
  # prevents login action to be filtered by check_if_login_required application scope filter
  skip_before_action :check_if_login_required, :check_password_change

There is no reference to check_if_login_required in RedmineOAuthController

Can anyone help me understand how this subclass is hiding the method defined in the grandparent class? Running with rails 5.2.4.2

I (somehow) got this installed in a production system where it seems to be working. I've diff'd all the files in the plugin and they are the same. I've tried copying the Gemfile.lock as well, but the problem persists.

Gary Aitken
  • 233
  • 2
  • 12

1 Answers1

0

I found this post

Which says to add raise:false

I don't know if this is the best method but changing the following line in the account_controller file fix the error:

skip_before_action :check_if_login_required, :check_password_change, raise: false

If someone has a better approach, I'm interested