summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-12-31 23:02:30 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-12-31 23:02:30 +0000
commitb32a37912af7a8c0251b54e896d8673d407bf171 (patch)
treeb46b27d296a287ea6ab190f2d4c90d415e7dd300 /etc
parent222efdce8f0f7d4f2d5c3cbb9c45e798248abbf5 (diff)
downloadpfsense-b32a37912af7a8c0251b54e896d8673d407bf171.zip
pfsense-b32a37912af7a8c0251b54e896d8673d407bf171.tar.gz
Modify isSystemAdmin() to check LDAP for a "admins" group.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/auth.inc6
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'];
OpenPOWER on IntegriCloud