inou/lib
James 7192f39bc1 fix: remove backward compat, migrate old access to proper RBAC grants
Removed the backward compatibility fallback that checked the old
dossier_access table from CanManageDossier/CanAccessDossier - it was
a security risk (hidden path that bypassed the new RBAC system).

Instead, added MigrateOldAccess() that converts existing dossier_access
entries to proper access grants on startup (idempotent - skips existing).

Migration rules:
- Self-references (accessor == target) skipped (owner access is automatic)
- can_edit = 1 → "rwdm" root grant
- can_edit = 0 → "r" root grant
- Role set to "Migrated" for tracking

Result: 12 grants migrated from old table.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 23:27:23 -05:00
..
._db_schema.go Initial commit from dev 2026-02-01 08:03:12 +00:00
access.go fix: remove backward compat, migrate old access to proper RBAC grants 2026-02-07 23:27:23 -05:00
config.go security: use 16-char hex system accessor ID from .env 2026-02-07 17:25:10 -05:00
crypto.go Initial commit from dev 2026-02-01 08:03:12 +00:00
data.go Initial commit from dev 2026-02-01 08:03:12 +00:00
db_auth.go Initial commit from dev 2026-02-01 08:03:12 +00:00
db_queries.go Initial commit from dev 2026-02-01 08:03:12 +00:00
db_schema.go Initial commit from dev 2026-02-01 08:03:12 +00:00
email.go Initial commit from dev 2026-02-01 08:03:12 +00:00
errors.go Initial commit from dev 2026-02-01 08:03:12 +00:00
files.go Initial commit from dev 2026-02-01 08:03:12 +00:00
lab_reference.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
llm.go Initial commit from dev 2026-02-01 08:03:12 +00:00
migrate_category.go Initial commit from dev 2026-02-01 08:03:12 +00:00
normalize.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
parse_numeric.go fix: genome query RBAC - use system context for data access 2026-02-07 16:31:17 -05:00
prompt.go Initial commit from dev 2026-02-01 08:03:12 +00:00
roles.go security: replace empty string bypass with explicit system accessor ID 2026-02-07 17:20:24 -05:00
signal.go Initial commit from dev 2026-02-01 08:03:12 +00:00
translate.go Initial commit from dev 2026-02-01 08:03:12 +00:00
types.go Initial commit from dev 2026-02-01 08:03:12 +00:00
v2.go fix: remove backward compat, migrate old access to proper RBAC grants 2026-02-07 23:27:23 -05:00