larxius commited on
Commit
1e654bd
·
verified ·
1 Parent(s): b9b3e9b

Update backend_structured/routes.py

Browse files
Files changed (1) hide show
  1. backend_structured/routes.py +5 -1
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
- if current_user.org_id:
 
 
 
 
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,