---
title: "Verify the last organization owner cannot remove their own ownership"
description: "Attempt to leave or downgrade the only owner of a disposable organization and verify the product prevents an ownerless state with a usable transfer path."
canonical_url: "https://vostride.com/agent-library/organization-membership/last-owner-protection.md"
md_url: "https://vostride.com/agent-library/organization-membership/last-owner-protection.md"
content_kind: "recipe"
topic: "organization-membership"
---

# Verify the last organization owner cannot remove their own ownership

Attempt to leave or downgrade the only owner of a disposable organization and verify the product prevents an ownerless state with a usable transfer path.

## Risk

Ownerless organizations can lose the ability to manage members or billing. This recipe checks the explicit last-owner rule and then proves the supported alternative works by assigning a second owner before the original owner leaves.

## Fixtures

- A disposable organization with exactly one owner and one ordinary test member.
- A documented last-owner protection rule and a supported owner-promotion action.
- A membership hook reporting owner count and role assignments for the two fixture accounts.

## Steps

1. As the sole owner, open member settings and verify the fixture hook reports exactly one owner.
2. Attempt the supported self-downgrade or leave action and verify the product blocks completion with an explanation that another owner is required.
3. Inspect membership state and verify the organization still has its original owner and no partial removal occurred.
4. Promote the second fixture member to owner through the normal confirmation flow and verify two owners in the interface and hook.
5. Repeat the original owner leave or downgrade action and verify it now succeeds while the second owner retains access to organization administration.

## Expected results

- The protected action cannot reduce owner count to zero.
- The rejected attempt leaves membership and administration usable.
- Establishing another owner enables the documented departure or downgrade path.

## False-pass traps

- A disabled button without an explanation can pass the permission boundary while still failing the required recovery experience.
- A hidden fixture owner would remove the last-owner condition unless setup verifies the count.

## Cleanup

- Delete the disposable organization through the remaining owner or restore original roles.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa auth state](/docs/agent-qa/guides/auth-state.md)

- [Organization membership QA recipes](/agent-library/organization-membership.md)
- [Software factory QA library](/agent-library.md)
