Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update backend_structured/routes.py
Browse files
backend_structured/routes.py
CHANGED
|
@@ -1713,6 +1713,8 @@ def create_scan(current_user):
|
|
| 1713 |
is_unlimited = True
|
| 1714 |
elif quota.used_count < quota.allocated_count:
|
| 1715 |
has_quota = True
|
|
|
|
|
|
|
| 1716 |
|
| 1717 |
if not has_quota:
|
| 1718 |
return jsonify({"message": f"Quota exceeded: You do not have enough quota for a {scan_type} Scan. Please upgrade your plan."}), 403
|
|
|
|
| 1713 |
is_unlimited = True
|
| 1714 |
elif quota.used_count < quota.allocated_count:
|
| 1715 |
has_quota = True
|
| 1716 |
+
elif user_level >= requested_level:
|
| 1717 |
+
has_quota = True
|
| 1718 |
|
| 1719 |
if not has_quota:
|
| 1720 |
return jsonify({"message": f"Quota exceeded: You do not have enough quota for a {scan_type} Scan. Please upgrade your plan."}), 403
|