New React Backend Repository
Find a file
Alexandre Brandizzi af441894d7 fix(permissions): clean up overrides on user delete and converge concurrent override writes (SH-328)
DeleteUserWithCascadeAsync never removed UserPermissionOverrides rows, and
the FK on UserId is Restrict. Once an override was saved for a member, the
admin hard-delete (DeleteUserAsync -> DeleteUserWithCascadeAsync) failed the
foreign key inside the transaction and the controller surfaced it as a 400,
so the user was never deleted. Add an explicit ExecuteDelete on
UserPermissionOverrides before the user is removed, matching how UserRoles is
already cleared in the same method (no schema change).

SetOverrideAsync was check-then-insert on the composite key with no
DbUpdateException handling, so two concurrent PUTs for the same
(UserId, PermissionKey) let the loser violate PK_UserPermissionOverrides and
return 500. Catch the conflict, detach the pending insert, and converge by
updating the persisted row to the caller's requested state.
2026-09-16 20:27:26 -03:00
.ebextensions fix(eb): configure work-order webhook HMAC secret source (#41) 2026-07-30 11:44:43 -03:00
.github fix(deploy): apply the health-convergence fix to the dev Terraform rollback 2026-09-10 10:55:45 -03:00
Api.SeaHavenIndustries feat(permissions): expose team member permission overrides (SH-328) 2026-09-16 18:02:02 -03:00
Api.SeaHavenIndustries.Tests feat(permissions): expose team member permission overrides (SH-328) 2026-09-16 18:02:02 -03:00
Data.SeaHavenIndustries feat(permissions): add team member permission policy foundation (SH-327) 2026-09-16 17:48:37 -03:00
docs fix(observability): preserve backend release identity (#114) 2026-09-15 16:08:14 -03:00
postman docs: add complete dev Postman API collection (#119) 2026-09-15 16:39:49 -03:00
scripts docs: add complete dev Postman API collection (#119) 2026-09-15 16:39:49 -03:00
SeaHaven.DataServices fix(permissions): clean up overrides on user delete and converge concurrent override writes (SH-328) 2026-09-16 20:27:26 -03:00
SeaHaven.Services feat(permissions): expose team member permission overrides (SH-328) 2026-09-16 18:02:02 -03:00
SeaHaven.Services.Tests feat(permissions): expose team member permission overrides (SH-328) 2026-09-16 18:02:02 -03:00
SeaHavenIndustries chore(config): document Phase 7 feature flags in appsettings and .env.example 2026-07-13 13:23:54 -03:00
SeaHavenIndustries.Tests fix(work-orders): keep SH placeholder WO numbers and block downgrades (#123) 2026-09-16 15:01:10 -03:00
terraform fix(deploy): treat applied HCP runs as success (#108) 2026-09-08 13:26:11 -04:00
.env.example feat: add API Sentry tracing (SH-298) (#105) 2026-09-04 14:11:32 -03:00
.gitattributes Initial commit 2024-09-28 14:58:36 -04:00
.gitignore feat(deploy): move dev application CD through Terraform (#102) 2026-09-03 14:12:06 +00:00
AGENTS.md chore(governance): enforce backend architecture and quality gates (#31) 2026-07-24 17:41:10 -03:00
ARCHITECTURE_AND_CODE_QUALITY.md chore(governance): enforce backend architecture and quality gates (#31) 2026-07-24 17:41:10 -03:00
BACKEND_ARCHITECTURE.md refactor: enforce backend boundaries and optimize dispatch (#30) 2026-07-24 17:35:34 -03:00
QUALITY_GATES.md chore(terraform): remove tf-poc rehearsal (SH-300) (#95) 2026-09-03 10:40:32 -04:00
REVIEW_AND_PR_FRAMEWORK.md feat(deploy): move dev application CD through Terraform (#102) 2026-09-03 14:12:06 +00:00
SeaHavenIndustries.sln test(work-orders): add Phase 0 domain unit tests 2026-07-02 09:19:28 -03:00
TODO.md chore(docs): remove Phase 7 ops markdown from PR scope 2026-07-13 13:51:34 -03:00