summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/perm.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-02 13:14:35 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-07-02 13:14:35 +0000
commit15b3431d068216bb134c64ff52af63bebc8f45f0 (patch)
tree71e8667413452be6de6a27de24e32f634131d8cd /frontends/php/include/perm.inc.php
parent9c1ce6fd1d7f4617f0796fa9eb9246e4e184813c (diff)
downloadzabbix-15b3431d068216bb134c64ff52af63bebc8f45f0.tar.gz
zabbix-15b3431d068216bb134c64ff52af63bebc8f45f0.tar.xz
zabbix-15b3431d068216bb134c64ff52af63bebc8f45f0.zip
- [DEV-144] improvements in users authentication methods (Artem)
- [ZBX-387] fixed issue with undefined function ctype_digit (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5814 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/perm.inc.php')
-rw-r--r--frontends/php/include/perm.inc.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php
index e47d104c..5fd080c3 100644
--- a/frontends/php/include/perm.inc.php
+++ b/frontends/php/include/perm.inc.php
@@ -219,6 +219,35 @@ function get_user_auth($userid){
return $result;
}
+/* Function: get_user_system_auth()
+ *
+ * Description:
+ * Returns overal user authentication type in system
+ *
+ * Comments:
+ * default is INTERNAL auth
+ *
+ * Author: Aly
+ */
+function get_user_system_auth($userid){
+ $result = ZBX_AUTH_INTERNAL;
+
+ $user_auth = get_user_auth($userid);
+
+ switch($user_auth){
+ case GROUP_GUI_ACCESS_SYSTEM:
+ $config = select_config();
+ $result = $config['authentication_type'];
+ break;
+ case GROUP_GUI_ACCESS_INTERNAL:
+ case GROUP_GUI_ACCESS_DISABLED:
+ default:
+ break;
+ }
+
+return $result;
+}
+
/***********************************************
GET ACCESSIBLE RESOURCES BY USERID
************************************************/