summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-02 13:44:26 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-02 13:44:26 +0000
commit27413fa685163ad085ba5b3b61015ae303cf7e04 (patch)
treeddec41077550dfc2509bf516a577890456c0fa39 /frontends/php
parent15b3431d068216bb134c64ff52af63bebc8f45f0 (diff)
downloadzabbix-27413fa685163ad085ba5b3b61015ae303cf7e04.tar.gz
zabbix-27413fa685163ad085ba5b3b61015ae303cf7e04.tar.xz
zabbix-27413fa685163ad085ba5b3b61015ae303cf7e04.zip
- [DEV-144] improvements in users authentication methods (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5815 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/authentication.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/frontends/php/authentication.php b/frontends/php/authentication.php
index 86951128..bb205e1f 100644
--- a/frontends/php/authentication.php
+++ b/frontends/php/authentication.php
@@ -215,8 +215,27 @@ include_once('include/page_header.php');
$frmAuth->AddRow(S_LDAP.SPACE.S_AUTHENTICATION.SPACE.S_ENABLED, new CCheckBox('authentication_type', $config['authentication_type'],$action,ZBX_AUTH_LDAP));
$frmAuth->AddRow(S_TEST.SPACE.S_AUTHENTICATION, ' ['.S_MUST_BE_VALID_SMALL.SPACE.S_LDAP.SPACE.S_USER.']');
- $frmAuth->AddRow(S_LOGIN , new CTextBox('user',$USER_DETAILS['alias'],null,'yes'));
+
+ if(GROUP_GUI_ACCESS_INTERNAL == get_user_auth($USER_DETAILS['userid'])){
+ $usr_test = new CComboBox('user', $USER_DETAILS['alias']);
+ $sql = 'SELECT u.alias, u.userid '.
+ ' FROM users u '.
+ ' WHERE '.DBin_node('u.userid').
+ ' ORDER BY alias ASC';
+ $u_res = DBselect($sql);
+ while($db_user = Dbfetch($u_res)){
+ if((check_perm2login($db_user['userid']) && check_perm2system($db_user['userid'])){
+ $usr_test->AddItem($db_user['alias'],$db_user['alias']);
+ }
+ }
+ }
+ else{
+ $usr_test = new CTextBox('user',$USER_DETAILS['alias'],null,'yes');
+ }
+
+ $frmAuth->AddRow(S_LOGIN , $usr_test);
$frmAuth->AddRow(S_USER.SPACE.S_PASSWORD,new CPassBox('user_password'));
+
// $frmAuth->AddRow( ,new CTextBox('',$config['']));
// $frmAuth->AddRow( ,new CTextBox('',$config['']));