Skip to content

Commit

Permalink
add capability check to the endpoint permission callback
Browse files Browse the repository at this point in the history
  • Loading branch information
CGastrell committed Feb 24, 2023
1 parent a5627a7 commit 795347d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function get_responses_permission_check() {
return $site_id;
}

if ( ! is_user_member_of_blog( get_current_user_id(), $site_id ) ) {
if ( ! current_user_can( 'manage_options' ) || ! is_user_member_of_blog( get_current_user_id(), $site_id ) ) {
return new WP_Error(
'invalid_user_permission_jetpack_form_responses',
'unauthorized',
Expand Down

0 comments on commit 795347d

Please sign in to comment.