Create pages from visitors

When I try to create a page from a route or controller with $page->create([]) if I am not logged in it throws an error “You cannot…”

How to bypass this ?

You would need to use $kirby->impersonate('user@example.com') either with a vaild user (email address) or you can use the kirby “superuser” $kirby->impersonate('kirby').

1 Like

Read the “Authentication for frontend stuff” section here: https://getkirby.com/docs/cookbook/migration/sites#users-and-permissions

1 Like

Perfect, thanks a lot !