Esempio n. 1
0
function main_network_ldapenable(){
	$users=new usersMenus();
	if($_GET["hostname"]==null){$hostname=$users->hostname;}else{$hostname=$_GET["hostname"];}	
	$squid=new squid($hostname);
	
	if($_GET["auth_allow"]=="yes"){
		$squid->AddAclType('group_password','external','ldap_group');
		$squid->AddAccessRule("http_access","allow","group_password");
		$squid->SimpleModeReorgRules();
		$squid->SaveToLdap();
	}else{
		$squid->DeleteAclRule('password');
		$squid->SimpleModeReorgRules();
		$squid->SaveToLdap();
	}
	
	
}
Esempio n. 2
0
function main_acls_delete_rule()
{
    $hostname = $_GET["hostname"];
    $squid = new squid($hostname);
    $squid->DeleteAclRule($_GET["rule_acl_delete"]);
}