Skip to content

Commit

Permalink
Fix vulnerability issue with author role
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Oct 3, 2024
1 parent 116a035 commit e630d36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/css/class-css-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public function register_routes() {
},
),
),
'permission_callback' => function () {
return current_user_can( 'publish_posts' );
'permission_callback' => function ( $request ) {
return current_user_can( 'edit_post', $request->get_param( 'id' ) );
},
),
)
Expand All @@ -166,8 +166,8 @@ public function register_routes() {
},
),
),
'permission_callback' => function () {
return current_user_can( 'publish_posts' );
'permission_callback' => function ( $request ) {
return current_user_can( 'edit_post', $request->get_param( 'id' ) );
},
),
)
Expand Down

0 comments on commit e630d36

Please sign in to comment.