Introduces accounts (ASP.NET Identity + cookie auth), four global roles (Admin/Writer/Editor/Reviewer), per-novel ownership and grants via ProjectMember, and a service-API-key principal for the MCP server and background import jobs. Enforcement lives in the application services (not endpoint filters) so the embedded agent and MCP tools, which call the same services directly, can't bypass it. Web client gets a login page, session-aware routing, and a People section for managing per-novel access. Also includes prior in-flight changes from this branch (CLAUDE.md compliance pass, dev-deploy docker-compose setup) that were uncommitted when this feature work started.
28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# CLAUDE.md forbids comments in C#, TS/TSX and CSS. Grep-based, so it is a fast trip-wire
|
|
# against re-drift rather than a full parser: it can be fooled by a genuinely commented-out
|
|
# URL or a `//` inside a string, but in practice those are rare enough that a false positive
|
|
# is worth fixing (rename or delete) rather than allowing every `//` in a string literal.
|
|
set -euo pipefail
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../.." && source ./scripts/ci/lib.sh
|
|
|
|
exclude_args=(
|
|
-path '*/node_modules/*' -o
|
|
-path '*/dist/*' -o
|
|
-path '*/bin/*' -o
|
|
-path '*/obj/*' -o
|
|
-path '*/Data/Migrations/*' -o
|
|
-path '*/Novelly.ServiceDefaults/Extensions.cs' -o
|
|
-path '*/vite-env.d.ts'
|
|
)
|
|
|
|
files=$(find . \( "${exclude_args[@]}" \) -prune -o \
|
|
\( -name '*.cs' -o -name '*.ts' -o -name '*.tsx' -o -name '*.css' \) -type f -print)
|
|
|
|
violations=$(grep -nE '(^|[[:space:]])(//|/\*)' $files 2>/dev/null | grep -vE 'https?://' || true)
|
|
|
|
if [[ -n "$violations" ]]; then
|
|
echo "$violations"
|
|
fail "Comments found in C#/TS/TSX/CSS. CLAUDE.md forbids them — rename or extract instead of explaining."
|
|
fi
|