mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Added SiteTreePermissionsTest->testRestrictedEditLoggedInUsersDeletedFromStage(), which verifies that previous fixes in r85335 and r85336 apply the correct permissions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85338 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
fec369531c
commit
04ae6d0f55
@ -242,5 +242,23 @@ class SiteTreePermissionsTest extends FunctionalTest {
|
||||
);
|
||||
}
|
||||
|
||||
function testRestrictedEditLoggedInUsersDeletedFromStage() {
|
||||
$page = $this->objFromFixture('Page', 'restrictedEditLoggedInUsers');
|
||||
$pageID = $page->ID;
|
||||
|
||||
$page->doPublish();
|
||||
$page->deleteFromStage('Stage');
|
||||
|
||||
// Get the live version of the page
|
||||
$page = Versioned::get_one_by_stage("SiteTree", "Live", "\"SiteTree\".ID = $pageID");
|
||||
|
||||
// subadmin users
|
||||
$subadminuser = $this->objFromFixture('Member', 'subadmin');
|
||||
$this->assertTrue(
|
||||
$page->canEdit($subadminuser),
|
||||
'Authenticated members can edit a page that was deleted from stage and marked as "Editable by logged in users" if they have cms permissions and belong to any of these groups'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user