inou/lib
James c3b5381c4c fix: add backward compatibility for old dossier_access table
RBAC editor was failing with 403 Forbidden when trying to edit permissions
for users who have access via the old dossier_access table but not the new
access grants table.

Added fallback logic to CanManageDossier and CanAccessDossier:
1. Check new RBAC system (access table) first
2. If no grant found, check old dossier_access table
3. For manage: check can_edit = 1
4. For access: check status = 1

This allows existing access relationships to work with the new RBAC editor
while we migrate data from old to new system.

Fixes: "Forbidden" error when editing permissions for legacy access grants

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 18:24:27 -05:00
..
._db_schema.go Initial commit from dev 2026-02-01 08:03:12 +00:00
access.go fix: add backward compatibility for old dossier_access table 2026-02-07 18:24:27 -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 security: replace empty string bypass with explicit system accessor ID 2026-02-07 17:20:24 -05:00