Problem/Motivation
This problematic behavior was discovered by @dixon_ in #3062486-33: Add the ability to create sub-workspaces in order to enable the dev -> stage -> live workflow for content:
While revision changes are contained in separate workspaces, deleting a node affects all workspaces.
Proposed resolution
When a workspace is active, the user should only be allowed to delete workspace-specific content, for example new entities or pending revisions for existing entities that were only created in that workspace.
Remaining tasks
TBD.
User interface changes
The "Delete" operation will be hidden from the UI for users that don't have a global "bypass content access" permissions. For users with restricted permissions but who are still able to access the entity deletion page, the form will display a message that the entity can not be deleted in that workspace and the Delete button will be disabled.
API changes
Deleting non-workspace-specific content from a workspace will throw an exception.
Data model changes
\Drupal\workspaces\WorkspaceAssociation::getAssociatedRevisions()
will also return default revisions for entities that were created in a workspace.
Release notes snippet
TBD.