Deleting a page with subpages that have 'delete:false'

This seems like a no-no from the start, but ¿Can I prevent a subpage to be individually deleted, while allowing it to be deleted along its parent?

Consider a page structure such as:

editions (delete: false)
    edition (delete: true)
        exhibitions (delete: false)
            exhibition A (delete: true)
            exhibition B (delete: true)
            ...
        performances (delete: false)
            performance A (delete: true)
            ...

I’d want to avoid users deleting categories such as ‘editions’ ‘exhibitions’ or ‘performances’ while I’d still want them to be able to delete items such as ‘edition’,‘exhibition’ or ‘performance’.

The problem is that the item ‘edition’ cannot be deleted because it contains the categories ‘exhibitions’ and ‘performances’ which cannot be deleted.

In this particular case permissions are not a solution because both the ability to delete itesm and the prohibition to delete categories affect the same type of user.

Thank you

The only thing I can think of it to set delete to true for all pages, but then use a hook to throw an error if a user tries to delete an item they are not allowed to delete. Downside of this approach is that the option is still available in the menu and the no-no only comes when the user tries to execute the option.

Or you could do delete: false on the edition as well, but add a “Cancel the edition” or whatever button to the edition blueprint which forces the deletion of the edition

Thank you both @texnixe and @adamkiss .

Would a ‘page.delete:before’ hook allow me to capture the ‘edition’ page delete attempt before it triggers an error on the subpages ?

If the answer is ‘yes’, would there be any way to cancel such attempt and trigger another one which would impersonate the kirby user.

If even possible, too much of a hack :confused: ?