Update the status of a page while the status is false

order.yml blueprint:

options:
    status: false
    url: false
    delete: false
    duplicate: false
    preview: false
    read:
        *: false
        admin: true
        accounting: true

Order pages are created only when payment is completed.
So it is not created from the panel. So I didn’t let the status change.
But when the user creates the order from the frontend, I can’t change the status because the page is created as a draft.

Is there a solution to this? Like forcing it…

Tried to give permission to customer role but failed again:

options:
    status:
        *: false
        customer: true
    url: false
    delete: false
    duplicate: false
    preview: false
    read:
        *: false
        admin: true
        accounting: true

Frontend side:

$orderPage->changeStatus("unlisted");

The status for this page cannot be changed

Actually works with customer permission. The reason it didn’t work was the impersonate method that used in other file:

kirby()->impersonate("kirby");

So will not work impersonate and logged user session together

I think there is an issue somewhere for allowing to force override those blueprint settings :walking_woman:

1 Like

Since you can also use a logged in user for authentication, you could use this user for impersonation instead of the Almighty? Haven’t tried that but could work with your blueprint setting per user role.

It would be nice if we could also send the status param while creating the page.
It automatically validates if the status parameter is sent.

I understood what you said, but the other file was actually an extension.
Since this is my own extension, there is no problem right now.

But if there is a plugin that requires a super user, the user session will be ignored for that page.

I think we need to develop this impersonate() method.
The current session needs to be resolved without overwriting it.