Skip to content

DRU-1134 -- Group people into teams that list apps - #1168

Merged
czpython merged 1 commit into
roles-and-teamsfrom
paulo/dru-1134-group-people-into-teams-that-list-apps
Nov 10, 2026
Merged

czpython merged 1 commit into
roles-and-teamsfrom
paulo/dru-1134-group-people-into-teams-that-list-apps

Conversation

@czpython

@czpython czpython commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

A team is a named group of people with a list of apps. This change stores teams and lets an admin manage them. It changes no access: every account still uses every app as before.

Backend

  • A new package, druks.teams. A team joins people and apps, so it sits above druks.accounts and the app loader, and druks.accounts does not change.
  • Team: a unique name, its member accounts, and a list of app names. Two new tables, teams and team_members.
  • GET, POST /api/teams and PUT, DELETE /api/teams/{team_id}. The admin gate is a dependency on the router, so each route is admin only, the list also. Create and replace take the same body: the name, the member account ids, and the app names.
  • A member must be an operator account. An app must be installed and not built in. Two teams cannot have the same name. Each refusal answers 422 with the reason.
  • Deleting a team removes its memberships and no account.

Platform

  • druks.exceptions.ValidationError: one error for input that Druks refuses. The server answers 422 with its message, so a route catches nothing.
  • Model.get and Model.get_or_none take an optional session as the first argument. Platform code passes its session, and an app leaves it out. A miss on get answers 404 as before.

Dashboard

  • A Teams section in Settings, in the Organization group after People, for admins only. It lists each team with its people and apps, and an admin can add, edit and delete a team.
  • The form picks people and apps with the same switch rows that app options use.

@czpython
czpython force-pushed the paulo/dru-1134-group-people-into-teams-that-list-apps branch from 1d44f36 to 29bbced Compare November 10, 2026 16:10
@czpython
czpython force-pushed the paulo/dru-1134-group-people-into-teams-that-list-apps branch from 29bbced to ed3cda6 Compare November 10, 2026 16:53
@czpython
czpython merged commit c9faf75 into roles-and-teams Nov 10, 2026
7 checks passed
@czpython
czpython deleted the paulo/dru-1134-group-people-into-teams-that-list-apps branch November 10, 2026 16:56
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