function ad_owners_default_permissions in Advertisement 6.3
Same name and namespace in other branches
- 6.2 owners/ad_owners.module \ad_owners_default_permissions()
- 7 owners/ad_owners.module \ad_owners_default_permissions()
Return array default permissions.
3 calls to ad_owners_default_permissions()
- ad_owners_add in owners/
ad_owners.module - Add an owner to an ad.
- ad_owners_form_alter in owners/
ad_owners.module - Implementation of hook_form_alter().
- ad_owners_permission in owners/
ad_owners.module - Determine whether the user has a given privilege.
File
- owners/
ad_owners.module, line 102 - Enhances the ad module to support ad owners.
Code
function ad_owners_default_permissions() {
$permissions = module_invoke_all('adapi', 'permissions', NULL);
$all = array();
$perms = array();
foreach ($permissions as $permission => $default) {
if ($default) {
$perms[] = $permission;
}
$all[] = $permission;
}
return array(
'default' => $perms,
'all' => $all,
);
}