mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 01:37:02 +02:00
added 4eyes feature for auditors
This commit is contained in:
@ -44,10 +44,6 @@ class ModelUserAuth extends Model {
|
||||
if($ok == 1) { return $ok; }
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: test the CUSTOM_EMAIL_QUERY_FUNCTION feature!
|
||||
*/
|
||||
|
||||
if(ENABLE_IMAP_AUTH == 1) {
|
||||
require 'Zend/Mail/Protocol/Imap.php';
|
||||
$ok = $this->checkLoginAgainstIMAP($username, $password, $data);
|
||||
@ -116,6 +112,8 @@ class ModelUserAuth extends Model {
|
||||
|
||||
$this->is_ga_code_needed($username);
|
||||
|
||||
$this->is_four_eye_auth_needed($data['admin_user']);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -213,6 +211,8 @@ class ModelUserAuth extends Model {
|
||||
|
||||
$session->set("auth_data", $data);
|
||||
|
||||
$this->is_four_eye_auth_needed($role);
|
||||
|
||||
AUDIT(ACTION_LOGIN, $username, '', '', 'successful auth against LDAP');
|
||||
|
||||
return 1;
|
||||
@ -494,10 +494,10 @@ class ModelUserAuth extends Model {
|
||||
}
|
||||
|
||||
|
||||
public function is_four_eye_auth_needed() {
|
||||
public function is_four_eye_auth_needed($admin_user = 0) {
|
||||
$session = Registry::get('session');
|
||||
|
||||
if(1 == FOUR_EYES_LOGIN_FOR_AUDITOR && 2 == $session->get("admin_user")) {
|
||||
if(1 == FOUR_EYES_LOGIN_FOR_AUDITOR && 2 == $admin_user) {
|
||||
$session->set("four_eyes", 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user