Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update backend_structured/routes.py
Browse files
backend_structured/routes.py
CHANGED
|
@@ -1458,7 +1458,11 @@ def create_scan(current_user):
|
|
| 1458 |
quota = None
|
| 1459 |
has_quota = False
|
| 1460 |
is_unlimited = False
|
| 1461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1462 |
# Match case-insensitively just in case
|
| 1463 |
quota = OrganizationScanQuota.query.filter(
|
| 1464 |
OrganizationScanQuota.org_id == current_user.org_id,
|
|
|
|
| 1458 |
quota = None
|
| 1459 |
has_quota = False
|
| 1460 |
is_unlimited = False
|
| 1461 |
+
|
| 1462 |
+
if current_user.role in ['admin', 'super_admin']:
|
| 1463 |
+
has_quota = True
|
| 1464 |
+
is_unlimited = True
|
| 1465 |
+
elif current_user.org_id:
|
| 1466 |
# Match case-insensitively just in case
|
| 1467 |
quota = OrganizationScanQuota.query.filter(
|
| 1468 |
OrganizationScanQuota.org_id == current_user.org_id,
|