mikejolley/WP-Job-Manager — pull request #329 by minderdl (2014-11-28 19:11:23+00:00)
Title: Added proper backend management that honours capabilities of users

This code solves issue mikejolley/WP-Job-Manager#328
It changes the visibility / executability of the following fields / actions:
Fields:
* _job_featured and _job_exipires are only available with manage_job_listings capability
* _job_author is only available with edit_others_job_listings capability

Actions:
* Jobs can be approved (bulk action and action icon) with the publish_job_listings capability
* Jobs can be expired (bulk action) with the manage_job_listings capability
* Jobs can be edited when the user has the capability corresponding to the current post state, i.e. edit_job_listings, edit_others_job_listings or edit_published_job_listings
* Jobs can be deleted when the user has the capability corresponding to the current post state, i.e. delete_job_listings, delete_others_job_listings or delete_published_job_listings

The standard behaviour of WP Job Manager can be achieved with the following capabilities: delete_job_listings, delete_published_job_listings, edit_job_listings, edit_published_job_listings. However, the WordPress capability system does not allow to prohibit modifications when waiting for review, which is an option of WP Job Manager.

BTW: The patch also corrects the missing notification after a bulk approval.