Skip to content

Add ViewFamilyChildren permission for need-to-know child visibility#1162

Open
LarsKemmann with Copilot wants to merge 4 commits into
mainfrom
copilot/implement-separate-permissions
Open

Add ViewFamilyChildren permission for need-to-know child visibility#1162
LarsKemmann with Copilot wants to merge 4 commits into
mainfrom
copilot/implement-separate-permissions

Conversation

Copilot AI commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Children in a family should only be visible on a need-to-know basis. Families/community members serving other families should not see co-assigned families' children by default.

Changes

  • Permission.cs — New ViewFamilyChildren = 160 enum value in the FamilyAndPersonInfo section
  • AuthorizationEngine.csDiscloseFamily() returns empty children list when permission is absent, enforced at the disclosure layer:
    Children = contextPermissions.Contains(Permission.ViewFamilyChildren)
        ? family.Children.Select(child => DisclosePerson(child, contextPermissions)).ToImmutableList()
        : ImmutableList<Person>.Empty,
  • GeneratedClient.ts — Frontend enum kept in sync
  • groupedPermissions.tsx — Added to FamilyAndPersonInfo category in role configuration UI
  • FamilyScreen.tsx — Child cards and "Add Child" button gated behind the permission

…dren in a family

Adds a new ViewFamilyChildren permission (value 160) that restricts
viewing children in a family on a need-to-know basis. Users without
this permission will not see children data in the family disclosure,
and the UI will hide child cards and the Add Child button accordingly.
Copilot AI changed the title [WIP] Add separate permissions for viewing children in a family Add ViewFamilyChildren permission for need-to-know child visibility Jun 4, 2026
Copilot AI requested a review from LarsKemmann June 4, 2026 16:24
@LarsKemmann
LarsKemmann marked this pull request as ready for review July 21, 2026 14:48
@LarsKemmann

Copy link
Copy Markdown
Member

@PabloDinella Can you please review and plan to merge this? The only challenge is that we will require a permissions update for every organization when this is launched to add the View Family Children permission to every role that currently has View Person Contact Info. I think that's the most appropriate way to make this backwards compatible (the only other option I came up with is that we could add a permissions schema version to each config.json file and use that to make automatic edits to the files on read -- but that might be a bit too complicated to just build right now without proper design).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement separate permissions for viewing children in a family

3 participants