Skip to content

Commit dcd97d7

Browse files
authored
Merge pull request #130 from Automattic/fix/api-routes-permissions-hardening
More restrictive API route permissions
2 parents b85dfc3 + be8856d commit dcd97d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/class-convertercontroller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function register_routes() {
147147
* @return bool|WP_Error
148148
*/
149149
public function rest_permission() {
150-
$is_user_authorized = current_user_can( 'edit_posts' );
150+
$is_user_authorized = current_user_can( 'edit_others_posts' );
151151

152152
if ( ! $is_user_authorized ) {
153153
return new WP_Error( 'newspack_content_converter_rest_invalid_permission', __( 'Unauthorized access.' ) );

0 commit comments

Comments
 (0)