# Refuse page edits a reader can no longer make, and say when access changes · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/7368576ef74592607ab317e07a3c0dbe91f9a540)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 7368576ef74592607ab317e07a3c0dbe91f9a540

Requested commit: 7368576ef74592607ab317e07a3c0dbe91f9a540

Commit: 7368576ef74592607ab317e07a3c0dbe91f9a540

Tree: 1838fe08c3bfe6ac610895c4d14303e6685f70e0

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Refuse page edits a reader can no longer make, and say when access changes

When an owner makes an editor a viewer, or removes them, while they have
the strategy open, the app kept committing their edits locally even
though the server refuses them. Now every mutator that commits a user's
edit to page content asks PageEditAccess (ref.canEditPages) first and
changes nothing when the open strategy cannot be edited: agents,
abilities, drawings, text, images, utilities, strategy settings, lineups,
clear, transactions, and undo/redo. Load and merge paths (fromHive,
mergeRemote, clearAll, addRecovered, restoreSnapshot) never ask, and
local strategies can always be edited.

A demotion while the strategy is open shows a toast once. A FORBIDDEN on
a fresh shell read of the open strategy (signed in, not through a share
link) marks access as lost: nothing stays editable, the last known role
is cleared, and a dialog leads back to the library. Edit media and
rename dialogs that are saved after the change close without saving.

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

```

## Parents

- [50c0f56e563cc02fc42a01182446df2b9c5eb5b1](https://git.cafe/dara/icarus/commit/50c0f56e563cc02fc42a01182446df2b9c5eb5b1?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/7368576ef74592607ab317e07a3c0dbe91f9a540?format=markdown)
