From 030bd0eede8cd87243c83dd1cec7d042d025ec87 Mon Sep 17 00:00:00 2001 From: Heimdall Date: Wed, 11 Nov 2026 12:16:18 +0000 Subject: [PATCH] Members: demoting an admin derives the flags from the roles left after the removal Co-Authored-By: Claude Sonnet 5.5 --- src/Bifrost.Web/Pages/App/Members/Index.cshtml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Bifrost.Web/Pages/App/Members/Index.cshtml.cs b/src/Bifrost.Web/Pages/App/Members/Index.cshtml.cs index e9b536b..f761a3f 100644 --- a/src/Bifrost.Web/Pages/App/Members/Index.cshtml.cs +++ b/src/Bifrost.Web/Pages/App/Members/Index.cshtml.cs @@ -177,6 +177,8 @@ public sealed class IndexModel( } else if (!(user.Id == Actor.UserAccount.Id && role == MemberRole.PlatformAdmin)) { + // Out of the collection too, so the flags below derive from the roles as they will stand after the save. + user.Membership.RoleAssignments.Remove(existingAssignment); dbContext.RoleAssignments.Remove(existingAssignment); }