Make WordPress Core

Changeset 2452


Ignore:
Timestamp:
03/17/2005 03:38:28 AM (20 years ago)
Author:
ryan
Message:

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

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r2298 r2452  
    209209    case 'control_edit':
    210210        ?>
    211         <td><?php if ( user_can_edit_user($user_ID,$authordata->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     211        <td><?php if ( user_can_edit_post($user_ID,$post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
    212212        <?php
    213213        break;
     
    215215    case 'control_delete':
    216216        ?>
    217         <td><?php if ( user_can_edit_user($user_ID,$authordata->ID) ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n  \'OK\' to delete, \'Cancel\' to stop."), wp_specialchars(get_the_title('', ''), 1) ) . "')\">" . __('Delete') . "</a>"; } ?></td>
     217        <td><?php if ( user_can_edit_post($user_ID,$post->ID) ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n  \'OK\' to delete, \'Cancel\' to stop."), wp_specialchars(get_the_title('', ''), 1) ) . "')\">" . __('Delete') . "</a>"; } ?></td>
    218218        <?php
    219219        break;
  • trunk/wp-admin/post.php

    r2441 r2452  
    229229    if( 'private' == $postdata->post_status && $postdata->post_author != $user_ID )
    230230        die ( __('You are not allowed to view other users\' private posts.') );
    231 
    232     if ( 'publish' == $post_status && (!user_can_create_post($user_ID)) ) {
    233          _e('You are not allowed to edit published posts.');
    234          break;
    235     }
    236231
    237232    if ($post_status == 'static') {
Note: See TracChangeset for help on using the changeset viewer.