Yes, there is a permission called read
, if you set that to false
in the pages
permissions, the user cannot access anything. You can also use this setting on a per blueprint basis.
No, that’s not possible, unless you use different blueprints for different user roles:
Either completely different sets: Custom blueprint for different roles - #2 by gillesvauvarin
Or single blueprints: User permisions for specific page and it's subpages - #13 by texnixe
There’s also other ways to limit access to pages:
-
before:hooks
-
overriding certain methods like
isReadable()
for fine-grained control:class NotePage extends Page { public function isReadable(): bool { if ($this->author()->toUser() === kirby()->user() || kirby()->user()->role()->name() === 'admin') { return true; } return false; }
}