---
title: "Reflect a collaborator role change in editing controls"
description: "Verify that a prepared downgrade from editor to viewer updates visible editing affordances and prevents an already-open stale editor from saving."
canonical_url: "https://vostride.com/agent-library/collaboration/role-change-edit-affordance.md"
md_url: "https://vostride.com/agent-library/collaboration/role-change-edit-affordance.md"
content_kind: "recipe"
topic: "collaboration"
---

# Reflect a collaborator role change in editing controls

Verify that a prepared downgrade from editor to viewer updates visible editing affordances and prevents an already-open stale editor from saving.

## Risk

Hiding an edit button after a role change is only part of permission handling. A stale form opened before the downgrade must follow the product authorization contract when submitted.

## Fixtures

- A disposable document grants the QA account Editor access and contains the text Original shared draft.
- A prepared administrator fixture actor can downgrade only this account on this document to Viewer.
- The product contract rejects writes after the downgrade and preserves the prior document content.

## Steps

1. Open the document editor while access is Editor, change the draft text locally, and do not save.
2. Use the prepared administrator actor to set Viewer access and verify the role change committed independently.
3. Attempt to save the already-open draft and verify an access-denied or read-only explanation rather than a saved success.
4. Reload the document and verify Original shared draft remains while editing controls are unavailable under Viewer access.
5. Run the prepared document check to verify neither the saved text nor revision count changed because of the rejected stale submission.

## Expected results

- The role downgrade commits before the stale save attempt.
- The rejected save leaves the original document content and revision history unchanged.
- The refreshed UI reflects Viewer access and provides no active editing affordance for the document.

## False-pass traps

- An absent Edit button after reload does not test a previously open editor.
- A permission error coupled with a changed document is still an authorization failure.

## Cleanup

- Restore the fixture account role and delete the disposable shared document.

## 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 first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Collaboration QA recipes](/agent-library/collaboration.md)
- [Software factory QA library](/agent-library.md)
