Skip to content

Commit

Permalink
Google Drive: Add a feature flag (#37358)
Browse files Browse the repository at this point in the history
In order to develop the site keyring connection for Google Drive, we
need to be able to enable the option on the server side, without it
appearing in the list of available connections.

So far we have done this by restricting the connection to Automatticians
on the server side, but this has caused other problems. This change
creates and configures a feature flag, so that the connection is only
available in the development environment.
  • Loading branch information
pablinos committed Nov 6, 2019
1 parent ceb8373 commit d1f5337
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/state/sharing/services/selectors.js
Expand Up @@ -119,6 +119,14 @@ export function getEligibleKeyringServices( state, siteId, type ) {
return false;
}

if (
'google_drive' === service.ID &&
( ! config.isEnabled( 'google-drive' ) ||
! canCurrentUser( state, siteId, 'manage_options' ) )
) {
return false;
}

return true;
} );
}
Expand Down
1 change: 1 addition & 0 deletions config/development.json
Expand Up @@ -58,6 +58,7 @@
"external-media/free-photo-library": true,
"gdpr-banner": false,
"google-my-business": true,
"google-drive": true,
"gutenboarding": true,
"help": true,
"help/courses": true,
Expand Down

0 comments on commit d1f5337

Please sign in to comment.