Add private code feature flag and enforce it
Created by: ryanslade
Add the AllowUserExternalServicePrivate
tag (https://github.com/sourcegraph/sourcegraph/blob/908d379f6381bc57cab50ba0308849a2d6db3b4d/cmd/frontend/backend/users.go#L57)
Add the all
option to https://github.com/sourcegraph/sourcegraph/blob/b6fbdfec9fc689c12baceee056966a27b05e6d0a/schema/site.schema.json#L426 which implies they are allowed to add public and private code.
Update https://github.com/sourcegraph/sourcegraph/blob/81e95f56ef4deeb75752b73dce4c7c42b9b08218/internal/conf/computed.go#L311 to return modes instead:
Disabled, Public, All
https://github.com/sourcegraph/sourcegraph/blob/ac7f8ba33c93c06af52646bb71e5ffb598864986/cmd/frontend/graphqlbackend/external_services.go#L40 should also return a mode and all locations where it is checked should be updated.
Finally, ensure that when cloning repos we don't filter out private repos if the user is allowed to add them: https://github.com/sourcegraph/sourcegraph/blob/ce3c397e5c4953b943f26c8ad951ea14b8249434/cmd/repo-updater/repos/syncer.go#L239-L242