Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
Commit34c4488unknown_key

fix(import): drop requireAdmin gate — normal users couldn't import their own repos

fix(import): drop requireAdmin gate — normal users couldn't import their own repos

GET /import, POST /import/github/user, POST /import/github/repo were
all gated requireAdmin → every non-site-admin clicking 'Import from
GitHub' on the dashboard hit the 403 'Admin access required.' page.

Import-from-GitHub is a per-user feature (user imports into their own
namespace) — only requireAuth is correct. The bulk import (/import/bulk)
already had the right gating; this brings the single-repo flow in line.

The new gradient-403 page that surfaced this bug looked great — the
underlying middleware was just wrong since the original site-bootstrap
era when import was admin-only.
Claude committed on May 25, 2026Parent: 0a50474
1 file changed+3434c448857e9e1b10965e07e54814f871c6ec2cc2
1 changed file+3−4
Modifiedsrc/routes/import.tsx+3−4View fileUnifiedSplit
1212import { repositories } from "../db/schema";
1313import { Layout } from "../views/layout";
1414import { softAuth, requireAuth } from "../middleware/auth";
15import { requireAdmin } from "../middleware/admin";
1615import type { AuthEnv } from "../middleware/auth";
1716import { config } from "../lib/config";
1817import { mkdir } from "fs/promises";
398397
399398// ─── IMPORT PAGE ─────────────────────────────────────────────
400399
401importRoutes.get("/import", requireAuth, requireAdmin, async (c) => {
400importRoutes.get("/import", requireAuth, async (c) => {
402401 const user = c.get("user")!;
403402 const success = c.req.query("success");
404403 const error = c.req.query("error");
671670
672671// ─── IMPORT ALL REPOS FROM GITHUB USER ───────────────────────
673672
674importRoutes.post("/import/github/user", requireAuth, requireAdmin, async (c) => {
673importRoutes.post("/import/github/user", requireAuth, async (c) => {
675674 const user = c.get("user")!;
676675 const body = await c.req.parseBody();
677676 const githubUsername = String(body.github_username || "").trim();
774773
775774// ─── IMPORT SINGLE REPO BY URL ───────────────────────────────
776775
777importRoutes.post("/import/github/repo", requireAuth, requireAdmin, async (c) => {
776importRoutes.post("/import/github/repo", requireAuth, async (c) => {
778777 const user = c.get("user")!;
779778 const body = await c.req.parseBody();
780779 const repoUrl = String(body.repo_url || "").trim();
781780