100204_Rights4TreePartBEs.php
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?
$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";
}
?>