Turn off all references and API calls to billing if the feature is disabled

This commit is contained in:
Joseph Schorr 2014-04-06 00:36:19 -04:00
parent c374e8146a
commit 19a20a6c94
12 changed files with 135 additions and 62 deletions

View file

@ -20,6 +20,8 @@ from util.names import parse_repository_name
from util.gravatar import compute_hash
from auth import scopes
import features
logger = logging.getLogger(__name__)
web = Blueprint('web', __name__)
@ -54,6 +56,7 @@ def snapshot(path = ''):
@web.route('/plans/')
@no_cache
@route_show_if(features.BILLING)
def plans():
return index('')
@ -152,6 +155,7 @@ def privacy():
@web.route('/receipt', methods=['GET'])
@route_show_if(features.BILLING)
def receipt():
if not current_user.is_authenticated():
abort(401)