diff --git a/securedrop/source_app/api.py b/securedrop/source_app/api.py index 6ae59de884b..7a37408a9b2 100644 --- a/securedrop/source_app/api.py +++ b/securedrop/source_app/api.py @@ -12,6 +12,7 @@ def make_blueprint(config): @view.route('/metadata') def metadata(): meta = { + 'allow_document_uploads': config.ALLOW_DOCUMENT_UPLOADS, 'gpg_fpr': config.JOURNALIST_KEY, 'sd_version': version.__version__, 'server_os': platform.linux_distribution()[1], diff --git a/securedrop/tests/test_source.py b/securedrop/tests/test_source.py index 051b4925bdc..51b9a92e100 100644 --- a/securedrop/tests/test_source.py +++ b/securedrop/tests/test_source.py @@ -565,6 +565,8 @@ def test_metadata_route(config, source_app): resp = app.get(url_for('api.metadata')) assert resp.status_code == 200 assert resp.headers.get('Content-Type') == 'application/json' + assert resp.json.get('allow_document_uploads') ==\ + config.ALLOW_DOCUMENT_UPLOADS assert resp.json.get('sd_version') == version.__version__ assert resp.json.get('server_os') == '16.04' assert resp.json.get('supported_languages') ==\