I’ve made a new role called “Writer”, and I want them to be able to only edit pages that are invisible, so they can be approved before publishing.
They can create pages, they can’t change visibility, and for updating pages I tried to do “only if page is invisible”.
An excerpt of their permissions is (including my attempted function):
'panel.page.create' => true,
'panel.page.visibility' => false,
'panel.page.delete' => false,
'panel.page.update' => function (){
if($this->target()->page()->visibility() === false){
return true;
}
else{
return false;
}
},
However they cannot edit anything.