Skip to content

Commit

Permalink
Disable integration in backend too
Browse files Browse the repository at this point in the history
  • Loading branch information
mboudet committed Apr 5, 2024
1 parent 6e1f2c9 commit fa5e93e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions askomics/api/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@ def integrate():
task = None
dataset_ids = []

if current_app.iniconfig.getboolean('askomics', 'disable_integration') and not session['user']['admin']:
return jsonify({
'error': True,
'errorMessage': "Integration was disabled by the administrator",
'dataset_ids': None
}), 400

try:

files_handler = FilesHandler(current_app, session, host_url=request.host_url)
Expand Down

0 comments on commit fa5e93e

Please sign in to comment.