Thank you for your answer. I am asking for page-permissions not for the posts. I’ve testet some plugins, but you can only edit the permissions. In wordpress itself you cant disable/edit which elements the backend user can have/see/use.
So i’ve coded a snipped which allows only editing and puplishing pages (changes). Also it hides the new button, the meta boxes to prevent the change of parent page and the menu media item (its only css hiding, but i dont know a better solution). Thats solved my problem:
/**
?* Add custom user roles for backend
?* notice: use remove_role('pageeditor') onchange!
* you need it only once or on changes
?*/
/*
add_role('pageeditor', 'Editor (specific for pages)', array(
? ? 'read' => false,
? ? 'create_posts' => false,
? ? 'edit_posts' => false,
? ? 'edit_others_posts' => false,
? ? 'publish_posts' => false,
? ? 'manage_categories' => false,
? ? 'manage_links' => false,
? ? 'moderate_comments' => false,
? ? 'edit_comments' => false,
? ? 'moderate_comments' => false,
? ? 'create' => false,
? ? 'create_pages' => false,
? ? 'manage_options' => false,
? ? 'delete' => false,
? ? 'delete_pages' => false,
? ? 'delete_others_pages' => false,
? ? 'edit_other_pages' => false,
? ? 'edit_pages' => true,
? ? 'edit' => true,
? ? 'edit_published_pages' => true,
? ? 'publish_pages' => true,
? ? 'upload_files' => true,
));
*/
/**
?* Modify backend view for role pageeditor
?*/
if (current_user_can('pageeditor') && !current_user_can('manage_options')) {
? ? add_action('admin_init', function () {
? ? ? ? //remove meta box
? ? ? ? remove_post_type_support('page', 'page-attributes');
? ? ? ? //remove media nav item
? ? ? ? remove_menu_page('upload.php');
? ? });
? ? //add role-* class to backend body
? ? add_filter('admin_body_class', function ($classes) {
? ? ? ? global $current_user;
? ? ? ? foreach ($current_user->roles as $role)
? ? ? ? ? ? $classes .= ' role-' . $role;
? ? ? ? return trim($classes);
? ? });
}