feat(F-008,F-009,F-010): complete Phase 1 foundation with middleware, navigation, and migrations
Implements authentication middleware with rate limiting, comprehensive permission system, full portal navigation with sidebar and header, company selection flow, and data migration tooling from SQL Server to PostgreSQL. Key additions: - Middleware: auth guards, rate limiting, session management - Permissions: role-based access control with hierarchical permission rules - Navigation: responsive sidebar with expandable sections, header with notifications - Company selector: multi-company user support with session-based active company - Data migration: comprehensive script for migrating auth and quest domain tables - Schema: added auth_user_type_permission_group junction table Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
bbcee034cb
commit
a67558de23
23 changed files with 2328 additions and 49 deletions
|
|
@ -0,0 +1,24 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "auth_user_type_permission_group" (
|
||||
"id" TEXT NOT NULL,
|
||||
"auth_user_type_id" TEXT NOT NULL,
|
||||
"auth_permission_group_id" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "auth_user_type_permission_group_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "auth_user_type_permission_group_auth_user_type_id_idx" ON "auth_user_type_permission_group"("auth_user_type_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "auth_user_type_permission_group_auth_permission_group_id_idx" ON "auth_user_type_permission_group"("auth_permission_group_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "auth_user_type_permission_group_auth_user_type_id_auth_pe_key" ON "auth_user_type_permission_group"("auth_user_type_id", "auth_permission_group_id");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "auth_user_type_permission_group" ADD CONSTRAINT "auth_user_type_permission_group_auth_user_type_id_fkey" FOREIGN KEY ("auth_user_type_id") REFERENCES "auth_user_type"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "auth_user_type_permission_group" ADD CONSTRAINT "auth_user_type_permission_group_auth_permission_group_i_fkey" FOREIGN KEY ("auth_permission_group_id") REFERENCES "auth_permission_group"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Loading…
Add table
Add a link
Reference in a new issue