function SearchCommentTestCase::setRolePermissions

Set permissions for role.

1 call to SearchCommentTestCase::setRolePermissions()
SearchCommentTestCase::testSearchResultsCommentAccess in modules/search/search.test
Verify access rules for comment indexing with different permissions.

File

modules/search/search.test, line 917

Class

SearchCommentTestCase
Test integration searching comments.

Code

function setRolePermissions($rid, $access_comments = FALSE, $search_content = TRUE) {
    $permissions = array(
        'access comments' => $access_comments,
        'search content' => $search_content,
    );
    user_role_change_permissions($rid, $permissions);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.