function content_access_get_setting_defaults in Content Access 5
Same name and namespace in other branches
- 8 content_access.module \content_access_get_setting_defaults()
- 6 content_access.module \content_access_get_setting_defaults()
- 7 content_access.module \content_access_get_setting_defaults()
1 call to content_access_get_setting_defaults()
File
- ./
content_access.module, line 423
Code
function content_access_get_setting_defaults($setting, $type) {
switch ($setting) {
default:
return array();
case 'view':
return array(
DRUPAL_ANONYMOUS_RID,
DRUPAL_AUTHENTICATED_RID,
);
case 'delete':
case 'update':
$roles = content_access_get_permission_access('edit ' . $type . ' content');
if (count(array_diff(array(
DRUPAL_ANONYMOUS_RID,
DRUPAL_AUTHENTICATED_RID,
), content_access_get_permission_access('edit own ' . $type . ' content'))) == 0) {
$roles[] = 'author';
}
return $roles;
case 'priority':
return 0;
}
}