Skip to content

Commit

Permalink
feat(/metadata): include allow_document_uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
wbaid committed Sep 29, 2019
1 parent adae044 commit 3b4777f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions securedrop/source_app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 2 additions & 0 deletions securedrop/tests/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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') ==\
Expand Down

0 comments on commit 3b4777f

Please sign in to comment.