function ad_access in Advertisement 6
Same name and namespace in other branches
- 5.2 ad.module \ad_access()
- 5 ad.module \ad_access()
- 6.3 ad.module \ad_access()
- 6.2 ad.module \ad_access()
- 7.2 ad.module \ad_access()
Implementation of hook_access().
4 calls to ad_access()
- ad_external_access in external/
ad_external.module - Implementation of hook_access().
- ad_html_access in html/
ad_html.module - Implementation of hook_access().
- ad_image_access in image/
ad_image.module - Implementation of hook_access().
- ad_text_access in text/
ad_text.module - Implementation of hook_access().
File
- ./
ad.module, line 486 - An advertising system for Drupal powered websites.
Code
function ad_access($op, $node, $account) {
if ($op == 'create') {
return user_access('create advertisements', $account);
}
if ($op == 'update' || $op == 'delete') {
return user_access('administer advertisements', $account) || module_exists('ad_owners') && ad_is_owner($node->nid) && user_access('edit own advertisements', $account);
}
}