function ctools_role_ctools_access_check
Check for access.
1 string reference to 'ctools_role_ctools_access_check'
File
-
plugins/
access/ role.inc, line 47
Code
function ctools_role_ctools_access_check($conf, $context) {
// As far as I know there should always be a context at this point, but this
// is safe.
if (empty($context) || empty($context->data) || !isset($context->data->roles)) {
return FALSE;
}
$roles = array_keys($context->data->roles);
$roles[] = $context->data->uid ? DRUPAL_AUTHENTICATED_RID : DRUPAL_ANONYMOUS_RID;
return (bool) array_intersect($conf['rids'], $roles);
}