mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: permission migrator for missing groups
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66103 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
63866493e7
commit
a14afe10d4
@ -31,8 +31,8 @@ class UpgradeSiteTreePermissionSchemaTask extends BuildTask {
|
||||
$pageIDs = DB::query("SELECT ID FROM SiteTree")->column('ID');
|
||||
foreach($pageIDs as $pageID) {
|
||||
$page = DataObject::get_by_id('SiteTree', $pageID);
|
||||
if($page->ViewersGroup) $page->ViewerGroups()->add($page->ViewersGroup);
|
||||
if($page->EditorsGroup) $page->EditorGroups()->add($page->EditorsGroup);
|
||||
if($page->ViewersGroup && DataObject::get_by_id("Group", $page->ViewersGroup)) $page->ViewerGroups()->add($page->ViewersGroup);
|
||||
if($page->EditorsGroup && DataObject::get_by_id("Group", $page->EditorsGroup)) $page->EditorGroups()->add($page->EditorsGroup);
|
||||
|
||||
$page->destroy();
|
||||
unset($page);
|
||||
|
Loading…
Reference in New Issue
Block a user