Just updated and browsing though the cheatsheets for the new permissions.
and i am wondering how to enable panel.page.read to multiple template pages all at once. whatever i try, i seem to be able to only disable all but one template.
e.g. putting up a specific page which is readable with all it’s children…
Is it normal that when access is denied, that the debug error page is loaded?
No, that’s actually two bugs: You a) shouldn’t see the page at all in overviews/be able to click on it and b) should get a nicer error message. @bastianallgeier?
Yes, unfortunately seems to be a bug. In an ideal world, such stuff would turn up in betas, but I guess that’s just how it is Could you post an issue on Github? We will fix this for 2.4.1
My question is also this: “i am wondering how to enable panel.page.read to multiple template pages all at once. whatever i try, i seem to be able to only disable all but one template.”
Still no answer?
'panel.page.read' => function() { // Permission to access/read a page in the panel
return $this->target()->page()->template() !== 'home';
},
Yes sure, I’m logged in with the right user role. And any other permission setting is working as expected.
I tried your exact code example but it doesn’t work – the pages do all show up and for the ones which are restricted it throws an error, as described by @carstengrimm further above.
I think it just haven’t been fixed, or is at least not working in the stable version?
I tested it in a current starterkit before I answered your question, with exactly the code I posted above. And all I see in the pages widget in the dashboard - when logged in as my editor role test user - is the home page, as you can see in the screenshot: