From a17e81a8f1749b91cf3f8a7cdc9fec4b1303bbea Mon Sep 17 00:00:00 2001 From: Son Date: Thu, 18 Nov 2021 10:51:57 +0100 Subject: [PATCH] user can't import csv if current_user.disable_import --- app/dashboard/views/batch_import.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/dashboard/views/batch_import.py b/app/dashboard/views/batch_import.py index 3a3cfb13..79615bec 100644 --- a/app/dashboard/views/batch_import.py +++ b/app/dashboard/views/batch_import.py @@ -18,6 +18,13 @@ def batch_import_route(): if not current_user.verified_custom_domains(): flash("Alias batch import is only available for custom domains", "warning") + if current_user.disable_import: + flash( + "you cannot use the import feature, please contact SimpleLogin team", + "error", + ) + return redirect(url_for("dashboard.index")) + batch_imports = BatchImport.filter_by(user_id=current_user.id).all() if request.method == "POST":