Skip to content

Commit

Permalink
Forms: fix permission check in Responses endpoint (#29223)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve authored Mar 2, 2023
1 parent d3c6ba9 commit 9883a26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Forms Responses endpoint: fix permission check.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public function register_rest_routes() {
$this->namespace,
$this->rest_base . '/responses',
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'get_responses' ),
'permissions_check' => array( $this, 'get_responses_permission_check' ),
'args' => array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'get_responses' ),
'permission_callback' => array( $this, 'get_responses_permission_check' ),
'args' => array(
'limit' => array(
'default' => 20,
'type' => 'integer',
Expand Down

0 comments on commit 9883a26

Please sign in to comment.