function smartqueue_domain_subqueue_access in Smartqueue Domain 7
Implements hook_subqueue_access().
Nodequeue module has already granted access to users with 'manipulate all queues' permission, and denied access to users who don't belong to at least one role assigned to this subqueue. All that is left is to check if the user is allowed to edit content for this domain.
File
- ./
smartqueue_domain.module, line 170
Code
function smartqueue_domain_subqueue_access($subqueue, $account, $queue) {
$user_domains = domain_get_user_domains($account);
$subqueue_info = explode(':', $subqueue->reference);
if (isset($user_domains[-1])) {
$user_domains[0] = 0;
unset($user_domains[-1]);
}
if (in_array($subqueue_info[3], $user_domains) && user_access('edit domain content') || user_access('set domain access')) {
return TRUE;
}
return FALSE;
}