Skip to content

feat(admin): superadmins remove an organisation without users - #326

Closed
iheitlager wants to merge 2 commits into
mainfrom
feat/324-remove-organisation
Closed

iheitlager wants to merge 2 commits into
mainfrom
feat/324-remove-organisation

Conversation

@iheitlager

Copy link
Copy Markdown
Member

Summary

  • Superadmins can remove an organisation that has no users: DELETE /v1/admin/organisations/{id}, a "remove organisation" button in the web admin tab, and frank participant remove NAME.
  • Refused with 409 while the organisation has users (disabled ones included), and when FRANK_SSO_ORGANISATION or FRANK_SSO_ADMIN_ORGANISATION names it, since serve would not start without it.
  • A removal is audited as participant_removed. The organisation's sightings keep its id as their reporter.

Changes

Added

  • store/participants.rs::remove_organisation, admin.rs::remove_organisation, cli.rs::participant_remove.
  • Web: button next to "set status", superadmin only, disabled while the organisation has users, with a confirmation.
  • Tests: store unit test, API test (removal, audit, 404 on repeat), permissions matrix row, SSO test, CLI test.

Changed

  • Spec 011 (Requirement 2 and two scenarios), spec 030 (admin controls list), ADR-016 untouched.
  • docs/openapi.yaml and the README route table: the new DELETE.
  • tests/mcdc/obligations.json: regenerated for the new decisions (make mcdc-obligations).
  • Spec 012 Requirement 9: one Tests: line per scenario. The three admin-group scenarios shared one line, so check-assurance counted two as untested (14/16). This commit is separate in the branch history.

Changelog

  • Superadmins remove an organisation without users, from the API, the web admin tab or frank participant remove; it is audited, and an organisation an SSO setting names is refused.

Review Findings

No prior /review run in this session.

Testing

  • make test passes (all workspace test binaries, including the new API, SSO, CLI and store tests)
  • make lint passes (fmt, clippy native and wasm32, qualified-subset gate)
  • make check-assurance: tested 100% (min 95%), 0 dead links
  • make test-mcdc: 48/48 decisions of two or more conditions covered
  • Browser test for the new button: not added; the existing admin-controls test covers that the button is hidden from admins. The CI container image job runs the browser suite.
  • Manual check on a running server with a superadmin token

Related Issues

Closes #324


🤖 Generated with Claude Code

iheitlager and others added 2 commits November 14, 2026 22:20
DELETE /v1/admin/organisations/{id}, superadmin only, a "remove
organisation" button in the web admin tab, and frank participant remove.
Refused with 409 while the organisation has users, disabled ones too,
and when FRANK_SSO_ORGANISATION or FRANK_SSO_ADMIN_ORGANISATION names
it, since serve would not start without it. Audited as
participant_removed; its sightings keep its id as their reporter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three admin-group scenarios shared one Tests line after the last,
so check-assurance counted two as untested (14/16).

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

Copy link
Copy Markdown
Member Author

Superseded by #325, merged into main and released as v0.58.0 while this one was in CI. The parts #325 lacks (the CLI's SSO check and test, spec 012 and 030 fixes) follow in a separate fix PR.


🤖 Analysis by Claude

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.

feat(admin): superadmins remove an organisation without users, from the web UI

1 participant