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 ?
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')
.
Read the “Authentication for frontend stuff” section here: https://getkirby.com/docs/cookbook/migration/sites#users-and-permissions
Perfect, thanks a lot !