packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/starthere.php
changeset 4 2212b2ded8bf
parent 3 a044870a9d3d
child 8 f68fdcc18df9
--- a/packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/starthere.php	Fri Jan 11 00:32:54 2013 -0500
+++ b/packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/starthere.php	Fri Jan 11 05:41:41 2013 -0500
@@ -22,5 +22,11 @@
 $adm = !empty($_SERVER['REMOTE_USER']) && ldap_test_group_membership($_SERVER['REMOTE_USER'], 'rtp');
 define('IS_ADMIN', $adm);
 
+if ( !IS_ADMIN && defined('NEED_ADMIN') )
+{
+	queue_message(E_ERROR, "Access to that URL is restricted to administrators.");
+	redirect('/');
+}
+
 if ( !isset($_SESSION['messages']) )
 	$_SESSION['messages'] = array();