Project

General

Profile

Actions

Feature #16930

closed

Need Additional parameter for hook to enable Multi Factor Authentication Patch

Added by Mani Malekmohammadi almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Hook requests
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix

Description

I developed a plugin for one of our clients in order to enable multi factor Authentication for their Redmine users, here is the plugin: https://github.com/acceptto-corp/acceptto-mfa-redmine-plugin
In order to enable multi factor login after login we redirect users to another page waiting to accept login on his/her device in a mobile application. for redirecting to another page after login I need to have access to params in Account_controller:

diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index ed38eea..4762d64 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -255,7 +255,7 @@ class AccountController < ApplicationController
     if params[:autologin] && Setting.autologin?
       set_autologin_cookie(user)
     end
-    call_hook(:controller_account_success_authentication_after, {:user => user })
+    call_hook(:controller_account_success_authentication_after, {:user => user, :params => params})
     redirect_back_or_default my_page_path
   end

-- 
1.8.4

Is it possible to include 'param' in hook parameters? I don't want to patch anything and just use plugin for easier upgrades.

Actions

Also available in: Atom PDF