function content_access_get_permission_by_op in Content Access 8
Same name and namespace in other branches
- 6 content_access.module \content_access_get_permission_by_op()
- 7 content_access.module \content_access_get_permission_by_op()
Gets the name of a perm for the given operation, if there is a suiting one.
3 calls to content_access_get_permission_by_op()
- ContentAccessAdminSettingsForm::submitForm in src/
Form/ ContentAccessAdminSettingsForm.php - Form submission handler.
- content_access_get_rids_per_node_op in ./
content_access.module - Get rids per node.
- content_access_get_setting_defaults in ./
content_access.module - Defines default values for settings.
1 string reference to 'content_access_get_permission_by_op'
- _content_access_get_node_permissions in ./
content_access.module - Gets node's access permissions.
File
- ./
content_access.module, line 313 - Content access module file.
Code
function content_access_get_permission_by_op($op, $type) {
switch ($op) {
case 'update':
return 'edit any ' . $type . ' content';
case 'update_own':
return 'edit own ' . $type . ' content';
case 'delete':
return 'delete any ' . $type . ' content';
case 'delete_own':
return 'delete own ' . $type . ' content';
default:
return FALSE;
}
}