Skip to content

Propose ADR-0008: unit memberships with roles (FO-02, LO-02, LO-03, RO-01, RO-03) - #75

Open
ronnyb71-agent wants to merge 4 commits into
mainfrom
docs/adr-0008-unit-memberships
Open

ronnyb71-agent wants to merge 4 commits into
mainfrom
docs/adr-0008-unit-memberships

Conversation

@ronnyb71-agent

@ronnyb71-agent ronnyb71-agent commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Proposes ADR-0008. A person can be in more than one unit and have a different role in each, just as in teams, so the role belongs on the membership.

What it proposes

  1. A new collection, enhetsmedlemskap, with a unit, a person, roles and a source (import or manual). There is one membership per person and unit. New memberships get the role Medarbeider by default, whether the import or an administrator creates them.
  2. The people import creates and removes only its own memberships. The roles on them are set in ilag. Administrators can also add memberships that SAP doesn't have, and the import never touches those.
  3. The unit leader becomes the role linjeleder on a membership. enheter.leader is removed after existing leaders are copied over.
  4. The role's links decide where it can be used. A team membership accepts only roles linked to its team's type (the existing teamTypes, RO-03). Roles get a matching link to unit levels (unitLevels), and a unit membership accepts only roles linked to its unit's level.
  5. personer.units and enheter.people become joins on the new collection, as personer.teams is today.

Not in this PR

  • The implementation follows in its own PR once this is accepted.
  • The specification changes ship with the implementation, in their own commit with an entry in decisions.md. They are: Enhetsmedlemskap in 4.1, the Enhet and Rolle entries, and linjeleder instead of enhetsleder in LO-02, LO-03 and 2.3.
  • What a linjeleder may edit (LO-03) is left for later, on ADR-0005's pattern.

Numbered 0008 because #65 proposes 0006 and 0007 is taken by mandates. Separately, the README index already lists the mandates record as 0006 although its file is 0007. I've left that row as it is.

🤖 Generated with Claude Code

ronnyb71-agent and others added 4 commits November 19, 2026 07:37
…O-01, RO-03)

A person can be in several units with a different role in each, as in
teams. Proposes an enhetsmedlemskap collection fed by the people import,
roles set in ilag, the unit leader as the role linjeleder instead of
enheter.leader, and roles scoped to teams, units or both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…RO-03)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant