Skip to content

Commit

Permalink
Added a user blog membership check in the API endpoint instead of SAL.
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor committed Dec 21, 2018
1 parent 9c3bff1 commit 6fcd58d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions json-endpoints/class.wpcom-json-api-get-site-endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,8 @@ protected function render_response_key( $key, &$response, $is_user_logged_in ) {
$response[ $key ] = $this->site->get_capabilities();
break;
case 'jetpack_modules':
$jetpack_modules = $this->site->get_jetpack_modules();
if ( ! is_null( $jetpack_modules ) ) {
$response[ $key ] = $jetpack_modules;
if ( is_user_member_of_blog() ) {
$response[ $key ] = $this->site->get_jetpack_modules();
}
break;
case 'plan' :
Expand Down

0 comments on commit 6fcd58d

Please sign in to comment.