Skip to content

Commit

Permalink
Merge pull request #2 from dd32/StevenDufresne-patch
Browse files Browse the repository at this point in the history
Disable the linter for permissions check.
  • Loading branch information
dd32 authored Jan 22, 2020
2 parents e71662c + 82b5c7c commit 189a904
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/class-wp-rest-block-directory-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function register_routes() {
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_Error|bool True if the request has permission, WP_Error object otherwise.
* phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
*/
public function get_items_permissions_check( $request ) {
if ( ! current_user_can( 'install_plugins' ) || ! current_user_can( 'activate_plugins' ) ) {
Expand All @@ -95,6 +96,7 @@ public function get_items_permissions_check( $request ) {

return true;
}
/* phpcs:enable */

/**
* Checks whether a given request has permission to install and activate plugins.
Expand Down

0 comments on commit 189a904

Please sign in to comment.