Level 1 users cannot edit or delete published posts. http://mosquito.wordpress.org/view.php?id=1004

git-svn-id: http://svn.automattic.com/wordpress/trunk@2453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-03-17 03:39:02 +00:00
parent ab0395cd3c
commit 3e2b1f0d75
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;