first commit

This commit is contained in:
Andres
2026-09-17 17:21:39 -04:00
parent c17f11f591
commit 252152b9fa
6 changed files with 466 additions and 155 deletions
@@ -1,17 +0,0 @@
const ALLOWED_IPS = [
"86.106.20.28", // L2
"89.116.209.21", // L2
"86.106.20.24", // L3
"84.32.173.80", // L3
"34.141.125.49", // euw3-stage-koalemos
"35.230.138.117", // euw2-prod-apollo
"35.242.131.17", // euw2-prod-apollo
"34.89.86.34", // euw2-prod-apollo
"35.242.132.122", // euw2-prod-apollo
"35.234.116.158", // euw3-stage-koalemos
"34.159.186.242", // euw3-stage-koalemos
]
module.exports = {
ALLOWED_IPS,
}
-101
View File
@@ -1,101 +0,0 @@
/// <reference path="../pb_data/types.d.ts" />
onRecordCreateRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to create superuser`)
}
e.next()
}, "_superusers")
onRecordUpdateRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to update superuser`)
}
e.next()
}, "_superusers")
onRecordDeleteRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to delete superuser`)
}
e.next()
}, "_superusers")
onRecordRequestPasswordResetRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to request password reset for superuser`)
}
e.next()
}, "_superusers")
onCollectionViewRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to view collection`)
}
e.next()
})
onCollectionCreateRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to create collection`)
}
e.next()
})
onCollectionUpdateRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to update collection`)
}
e.next()
})
onCollectionDeleteRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to delete collection`)
}
e.next()
})
onCollectionsImportRequest((e) => {
const { ALLOWED_IPS } = require(`${__hooks}/superusers-allow-list.js`)
const ip = e.realIP()
if (!ALLOWED_IPS.includes(ip)) {
throw new BadRequestError(`Not allowed to import collections`)
}
e.next()
})
+8 -7
View File
@@ -44,6 +44,7 @@
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"embla-carousel-react": "^8.6.0",
"esbuild": "^0.28.2",
"framer-motion": "^11.15.0",
"input-otp": "^1.4.2",
"lucide-react": "^0.469.0",
@@ -73,15 +74,15 @@
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^5.2.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.39.4",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.1.0",
"globals": "^15.14.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.17",
"terser": "^5.37.0",
"vite": "^7.3.1",
"eslint": "^9.39.4",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-import": "^2.32.0",
"eslint-import-resolver-alias": "^1.1.2"
"vite": "^7.3.1"
}
}
}
-15
View File
@@ -1,15 +0,0 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import LayoutWrapper from '@/components/LayoutWrapper.jsx';
export default function ArgusPage() {
return (
<LayoutWrapper>
<Helmet><title>Argus | Korrith</title></Helmet>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24">
<h1 className="text-4xl md:text-5xl font-bold text-foreground">Argus</h1>
<p className="mt-4 text-muted-foreground text-lg">Content coming soon in Phase 2.</p>
</div>
</LayoutWrapper>
);
}
-15
View File
@@ -1,15 +0,0 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import LayoutWrapper from '@/components/LayoutWrapper.jsx';
export default function ReportsPage() {
return (
<LayoutWrapper>
<Helmet><title>Reports and Evidence | Korrith</title></Helmet>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24">
<h1 className="text-4xl md:text-5xl font-bold text-foreground">Reports and Evidence</h1>
<p className="mt-4 text-muted-foreground text-lg">Content coming soon in Phase 2.</p>
</div>
</LayoutWrapper>
);
}