Strange behaviour with permissions
Permalink
I create a page in code and want only the creator (which is a registerd user) to be able to add, admin and delete blocks in the main area.
Strange thing i that the user when logged in can move, add and admin blocks but is not able to delete..
Any help? I realy don't understand what is going wrong.
Thnx in advance...
Strange thing i that the user when logged in can move, add and admin blocks but is not able to delete..
Any help? I realy don't understand what is going wrong.
Thnx in advance...
$u = new User(); $pData = array('uID' => $u->getUserID(), 'pkgID' => 0, 'cName' => $tab->tName, 'cHandle' => $ch->uuid(), 'cDescription' => $tab->tName); $oPage = Page::getByPath('/pages'); $ct = CollectionType::getByHandle('facebook_page'); $newPage = $oPage->add($ct, $pData); Loader::model('attribute/categories/collection'); $cak = CollectionAttributeKey::getByHandle('campaignid'); $tak = CollectionAttributeKey::getByHandle('tabid'); $pl = PageTheme::getByID(7); $newPage->setTheme($pl); $newPage->addAttribute($tak, $tab->ID); // Assign permissions to page so only the new user can view $pxml->guests['canRead'] = false; $pxml->registered['canRead'] = false; $pxml->group[0]['gID'] = ADMIN_GROUP_ID;
Viewing 15 lines of 26 lines. View entire code block.