No (php) error message but “Du darfst dies nicht tun” if the editor hit “save”.
The changes are saved anyway,
Here is my “roles” snippet:
...
'panel.page.visibility' => function() {
//error_log($this->target()->page()->template());
//error_log( print_r( $this->target(), true ) );
//error_log($this->state());
if($this->target()->page()->template() === 'page') {
return false;
} else {
return true;
}
},
...
I think the “visibility” is a part of the normal save-flow and so the permission-exception kicks in.
S.