function shoutbox_domain_shoutbox_user_access_alter in Shoutbox 7
Same name and namespace in other branches
- 7.2 shoutbox_domain/shoutbox_domain.module \shoutbox_domain_shoutbox_user_access_alter()
Implements hook_shoutbox_user_access_alter().
File
- shoutbox_domain/
shoutbox_domain.module, line 109
Code
function shoutbox_domain_shoutbox_user_access_alter(&$access_granted, $permission, $shout = NULL) {
$domain_access_granted = user_access($permission . ' assigned domains');
// If this is an administrator, we grant all permissions requested.
if (user_access('administer shoutbox assigned domains') && shoutbox_domain_is_assigned_domain()) {
$access_granted = TRUE;
}
if ($domain_access_granted && shoutbox_domain_is_assigned_domain() && !$access_granted) {
$access_granted = TRUE;
}
}