function OgNodeAccess::testNoStrictAccessNodeUpdate in Organic groups 7.2
Test non-strict access permissions for updating group node. A non-member of a group who has core node access update permission is allowed access.
File
- ./
og.test, line 237
Class
- OgNodeAccess
- Test Group node access. This will test nodes that are groups and group content.
Code
function testNoStrictAccessNodeUpdate() {
// Set Node access strict variable.
variable_set('og_node_access_strict', FALSE);
// Login as editor and try to change the group node and group content.
$this
->drupalLogin($this->editor_user);
$this
->drupalGet('node/' . $this->group1->nid . '/edit');
$this
->assertResponse('200', t('A non-member with core node access permissions was not denied access.'));
$this
->drupalGet('node/' . $this->group_content->nid . '/edit');
$this
->assertResponse('200', t('A non-member with core node access permissions was not denied access to edit group content node.'));
// Login as a group manager and try to change group node.
$this
->drupalLogin($this->group_manager);
$this
->drupalGet('node/' . $this->group1->nid . '/edit');
$this
->assertResponse('200', t('Group manager allowed to access to edit group node.'));
$this
->drupalGet('node/' . $this->group_content->nid . '/edit');
$this
->assertResponse('200', t('Group manager allowed to access to edit group content node.'));
}