Revert "Don’t let people create a normal key in trial mode"

This commit is contained in:
Chris Hill-Scott
2016-10-10 16:50:46 +01:00
committed by GitHub
parent 13227606a9
commit 8e323a81a8
2 changed files with 6 additions and 32 deletions

View File

@@ -68,12 +68,13 @@ def create_api_key(service_id):
key['name'] for key in api_key_api_client.get_api_keys(service_id=service_id)['apiKeys']
]
form = CreateKeyForm(key_names)
form.key_type.choices = filter(None, [
(KEY_TYPE_NORMAL, 'Send messages to anyone{}')
if not current_service['restricted'] else None,
form.key_type.choices = [
(KEY_TYPE_NORMAL, 'Send messages to anyone{}'.format(
', once this service is not in trial mode' if current_service['restricted'] else ''
)),
(KEY_TYPE_TEST, 'Simulate sending messages to anyone'),
(KEY_TYPE_TEAM, 'Only send messages to your team or whitelist')
])
]
if form.validate_on_submit():
secret = api_key_api_client.create_api_key(
service_id=service_id,