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:
Ryan Boren 2005-03-17 03:39:02 +00:00
parent 7fa77a3e96
commit d381ae36da
1 changed files with 1 additions and 1 deletions

View File

@ -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;