mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 05:38:07 +01:00
Level 1 users cannot edit or delete published posts. http://mosquito.wordpress.org/view.php?id=1004
git-svn-id: https://develop.svn.wordpress.org/trunk@2453 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7fa77a3e96
commit
d381ae36da
@ -354,7 +354,7 @@ function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
|
||||
$post_data = get_postdata($post_id);
|
||||
$post_author_data = get_userdata($post_data['Author_ID']);
|
||||
|
||||
if ( ($user_id == $post_author_data->ID)
|
||||
if ( (($user_id == $post_author_data->ID) && !($post_data['post_status'] == 'publish' && $author_data->user_level < 2))
|
||||
|| ($author_data->user_level > $post_author_data->user_level)
|
||||
|| ($author_data->user_level >= 10) ) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user