added 4eyes feature for auditors

This commit is contained in:
SJ
2015-02-20 12:58:36 +01:00
parent bc8d264778
commit 4356a91b59
8 changed files with 287 additions and 6 deletions

View File

@ -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);
}