Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Tim C 155 posts 512 karma points
    May 20, 2016 @ 05:40
    Tim C

    Prevent unpublish/delete of parent node

    I have been testing this package and it seems ideal for my needs.

    However, there seems to be one issue : to allow users to create documents, I need to give them edit access at the parent level, so the create option is visible and creates documents one level below (where I want them).

    However, this means they have access to unpublish (or worse, delete) the parent node.

    I could hide the ufe panel for edit at the parent node by javascript, but that's not very secure. Is there any other way around this?

    In other words, they should be able to create and edit child documents but not do anything to the parent.


    [update] I found out that you can control permissions by user at page level, so I can at least remove delete : but I need to allow 'publish' so users can self-publish the child nodes - but then they can still unpublish the root node, so this is still a problem.

    Is there any configuration I can do on this?

  • Kenn Jacobsen 133 posts 791 karma points MVP 2x c-trib
    May 30, 2016 @ 08:36
    Kenn Jacobsen

    Hi Tim,

    Unfortunately not. The way this package works is tightly coupled with the permissions system in the Umbraco backoffice.

    You may be able to do something with dynamic styles to hide the buttons in UFE you don't want displayed at a given page?


  • Paul Seal 405 posts 2214 karma points MVP 3x c-trib
    May 30, 2016 @ 13:10
    Paul Seal

    You can achieve this quite easily if you follow this article

  • Tim C 155 posts 512 karma points
    Jun 05, 2016 @ 13:22
    Tim C


    I think this is the answer

    Prevent creation or editing of content items which have a certain documentTypeAlias

    presumably I could extend this to include deletion and publishing/unpublishing events.

    Would this code work in the App_Code folder?

    My Umbraco installation is on a hosted web service, and I can't work with Visual Studio remotely.

  • Veronica Burd 76 posts 200 karma points
    Jun 05, 2016 @ 13:36
    Veronica Burd

    Hi Tim,

    Yes, you can add handlers for delete and un/publish events in a class file in App_Code. I've done just that and it works a treat.



  • Tim C 155 posts 512 karma points
    Jun 07, 2016 @ 21:33
    Tim C

    Thanks to both of you, this looks exactly what I need.

    Looks like the list of event handlers is here

Please Sign in or register to post replies

Write your reply to: