realbig / rbm-field-helpers

0 stars 1 forks source link

Make it possible for Users without edit_posts to edit a specific Post #79

Closed d4mation closed 3 years ago

d4mation commented 3 years ago

Currently we explicitly check edit_posts. This is undesirable when a CPT could have mapped this to something else or the User in question cannot edit all of the Posts in that CPT but can edit the specific one.

current_user_can( 'edit_post', $post_ID ) should correct this I believe.

https://github.com/realbig/rbm-field-helpers/blob/611450b8d466c0a78d68b5e7a8eb6bc8c8924673/core/class-rbm-fh-fields-save.php#L167-L186