From 25b49b2cebd89a6ed161c3ff92d30508c304ae31 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Fri, 9 May 2008 00:45:17 +0000 Subject: [PATCH] Remove last remaining user level checks in favor of capabilities checks. props filosofo. fixes #6940 git-svn-id: http://svn.automattic.com/wordpress/trunk@7912 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- xmlrpc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 3a2b159be7..8792e2650d 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -344,7 +344,7 @@ function wp_allow_comment($commentdata) { $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); } - if ( $userdata && ( $user_id == $post_author || $user->has_cap('level_9') ) ) { + if ( $userdata && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) { // The author and the admins get respect. $approved = 1; } else { diff --git a/xmlrpc.php b/xmlrpc.php index 7a60859853..7a0fb48f91 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -788,7 +788,7 @@ class wp_xmlrpc_server extends IXR_Server { do_action('xmlrpc_call', 'blogger.getUsersBlogs'); set_current_user(0, $user_login); - $is_admin = current_user_can('level_8'); + $is_admin = current_user_can('manage_options'); $struct = array( 'isAdmin' => $is_admin,