100204_Rights4TreePartBEs.php 1.08 KB
<?
$CONFIG_WriteRights4TreeParts = array(
	1,		//	mensch.coop
	13,		//	vuj
	14,		//	um
	15,		//	tl
	16,		//	frederick
	209,	//	mensch
);
$CONFIG_ReadRights4TreeParts = array(	);

require_once("../../../include/config.php");
$_LOSPDIR = $_LOSP_PATH_TO_ROOT = '../../../';
$_LOSP_DEV = false;
require_once("../../../include/System/php/RequireClass.inc.php");

$DB = StorableFactory::create($_LOSP_STORABLE_KINDOF, $_LOSP_STORABLE_DATA);
$HostAccount = BasisElement::createNewInstance($DB, 'Account', 0, $param_PartOf=null);
LospAuth::login($HostAccount, $DB);

echo "\nrepair: give Rights 4 the TreePart BasisElements\n";


CONFIG::generateSocialNetworkTree($HostAccount, $DB);
$var_mensch_coop = CONFIG::getSocialNetworkTree();


foreach($var_mensch_coop['Parts'] as $BasisElement) {

	BasisElement::loadObjectLevel($HostAccount, $DB, $BasisElement, 'Edit' );
	$BasisElement->getObjVar('RightManagement')->getAuthorisationList()->updateAuthList($CONFIG_ReadRights4TreeParts, $CONFIG_WriteRights4TreeParts);
	$BasisElement->saveObject($HostAccount, $DB);
	echo "\t* $BasisElement ->saveObject()\n";

}


?>