Skip to content

Commit

Permalink
Merge pull request Automattic#581 from Automattic/add/wordads-jetpack…
Browse files Browse the repository at this point in the history
…-dev

WordAds: Add Config flag for Jetpack Sites to manage ads.
  • Loading branch information
dbspringer committed Nov 24, 2015
2 parents fb3071b + 67f092f commit 169dee6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/lib/ads/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ module.exports = {
*/
canAccessWordads: site => {
if ( config.isEnabled( 'manage/ads' ) ) {
return site.options && site.options.wordads && site.user_can_manage && ! site.jetpack;
return site.options &&
site.options.wordads &&
site.user_can_manage &&
( ! site.jetpack || config.isEnabled( 'manage/ads/jetpack' ) );
}

return false;
Expand Down
1 change: 1 addition & 0 deletions config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"manage/customize": true,

"manage/ads": true,
"manage/ads/jetpack": true,

"vip": false,
"vip/deploys": true,
Expand Down

0 comments on commit 169dee6

Please sign in to comment.