summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/perm.inc.php
diff options
context:
space:
mode:
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
************************************************/