'view own workspace',
'bypass entity access own workspace',
];
$this->
createContentType(['type' => 'test', 'label' => 'Test'
]);
$this->
setupWorkspaceSwitcherBlock();
$ditka =
$this->
drupalCreateUser(array_merge($permissions,
['create test content'
]));
// Login as a limited-access user and create a workspace.
$this->
drupalLogin($ditka);
$bears =
$this->
createWorkspaceThroughUi('Bears', 'bears'
);
$this->
switchToWorkspace($bears);
// Now create a node in the Bears workspace, as the owner of that workspace.
$ditka_bears_node =
$this->
createNodeThroughUi('Ditka Bears node', 'test'
);
$ditka_bears_node_id =
$ditka_bears_node->
id();
// Editing both nodes should be possible.
$this->
drupalGet('/node/' .
$ditka_bears_node_id . '/edit'
);
$this->
assertSession()->
statusCodeEquals(200
);
// Create a new user that should be able to edit anything in the Bears