Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update frontend/src/pages/NewScan.jsx
Browse files
frontend/src/pages/NewScan.jsx
CHANGED
|
@@ -68,6 +68,7 @@ export const NewScan = () => {
|
|
| 68 |
}, [scanType]);
|
| 69 |
|
| 70 |
const hasQuota = (methodId) => {
|
|
|
|
| 71 |
if (!quotas || quotas.length === 0) return true;
|
| 72 |
const q = quotas.find(q => q.scan_type.toLowerCase() === methodId.toLowerCase());
|
| 73 |
if (!q) return true;
|
|
@@ -228,7 +229,7 @@ export const NewScan = () => {
|
|
| 228 |
return 1;
|
| 229 |
};
|
| 230 |
|
| 231 |
-
const userTierLevel = getTierLevel(user?.subscription_tier || 'free');
|
| 232 |
|
| 233 |
return (
|
| 234 |
<div className="max-w-4xl mx-auto w-full flex flex-col gap-lg text-left">
|
|
|
|
| 68 |
}, [scanType]);
|
| 69 |
|
| 70 |
const hasQuota = (methodId) => {
|
| 71 |
+
if (user?.role === 'admin' || user?.role === 'super_admin') return true;
|
| 72 |
if (!quotas || quotas.length === 0) return true;
|
| 73 |
const q = quotas.find(q => q.scan_type.toLowerCase() === methodId.toLowerCase());
|
| 74 |
if (!q) return true;
|
|
|
|
| 229 |
return 1;
|
| 230 |
};
|
| 231 |
|
| 232 |
+
const userTierLevel = (user?.role === 'admin' || user?.role === 'super_admin') ? 3 : getTierLevel(user?.subscription_tier || 'free');
|
| 233 |
|
| 234 |
return (
|
| 235 |
<div className="max-w-4xl mx-auto w-full flex flex-col gap-lg text-left">
|