function oa_sectionsNodePublicAccess::test_oa_sectionsPublicAccess in Open Atrium Core 7.2
File
- modules/
oa_sections/ tests/ oa_sectionsNodePublicAccess.test, line 17 - Tests permission inheritance for oa_subspaces
Class
- oa_sectionsNodePublicAccess
- @file Tests permission inheritance for oa_subspaces
Code
function test_oa_sectionsPublicAccess() {
extract($this
->createOaSpaceAndUsers());
$team = $this
->createNodeInOaSpace($space, array(
'type' => 'oa_team',
'uid' => $space_admin->uid,
'field_oa_team_users' => array(
LANGUAGE_NONE => array(
array(
'target_id' => $space_member->uid,
),
array(
'target_id' => $space_admin->uid,
),
),
),
));
$space_member_2 = $this
->createUserInOaSpace($space);
$non_member = $this
->drupalCreateUser();
// Group that just $space_member is part of.
$group = $this
->drupalCreateNode(array(
'type' => 'oa_group',
));
og_group('node', $group, array(
'entity' => $space_member,
));
// Test a public space.
$this
->oaTestOaSectionAccess('a public space', $space, $space_admin, $space_member, $space_member_2, $non_member, $group, $team);
}