diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-12-31 23:02:30 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-12-31 23:02:30 +0000 |
commit | b32a37912af7a8c0251b54e896d8673d407bf171 (patch) | |
tree | b46b27d296a287ea6ab190f2d4c90d415e7dd300 | |
parent | 222efdce8f0f7d4f2d5c3cbb9c45e798248abbf5 (diff) | |
download | pfsense-b32a37912af7a8c0251b54e896d8673d407bf171.zip pfsense-b32a37912af7a8c0251b54e896d8673d407bf171.tar.gz |
Modify isSystemAdmin() to check LDAP for a "admins" group.
-rw-r--r-- | etc/inc/auth.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 3f88069..8f66098 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -335,6 +335,12 @@ function getGroupHomePage($group = "") { function isSystemAdmin($username = "") { global $groupindex, $userindex, $config, $g; + if($config['system']['webgui']['backend'] == "ldap") { + $groups = ldap_get_groups($username); + if(in_array("admins", $groups)) + return true; + } + if ($username == "") { return 0; } $gname = $config['system']['group'][$groupindex[$config['system']['user'][$userindex[$username]]['groupname']]]['name']; |