Ticket #4404: xmlrpc.php-diff

File xmlrpc.php-diff, 544 bytes (added by josephscott, 5 years ago)
Line 
1Index: xmlrpc.php
2===================================================================
3--- xmlrpc.php  (revision 5648)
4+++ xmlrpc.php  (working copy)
5@@ -925,8 +925,9 @@
6            return $this->error;
7          }
8 
9+      $cap = ($publish) ? 'publish_posts' : 'edit_posts';
10          $user = set_current_user(0, $user_login);
11-         if ( !current_user_can('publish_posts') )
12+         if ( !current_user_can($cap) )
13            return new IXR_Error(401, __('Sorry, you can not post on this weblog or category.'));
14 
15                // The post_type defaults to post, but could also be page.