Copied to clipboard

Flag this post as spam?

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


  • overflew 87 posts 110 karma points
    Dec 07, 2010 @ 02:53
    overflew
    0

    Node Permissions - Possible to configure with events?

    Hi there.

    I'm looking to configure the allowed events for Users to meet our clients needs, and feel it'll get a bit hairy trying to configure it with the regular umbracoUser2NodePermission table - Is it possible to enable / disable permissions (e.g. Create, Delete) in an event fashion?

    For example: They'd like a particular User Type to not be able to edit a specific parent node (e.g. 'Products'), but be able to Update its children, and create on the leve below that.

    As the content tree is quite large, and the node permissions are per-user, not user-type, I can see this getting messy if I were to utilise this using the umbracoUser2NodePermission table.

    If I could either bind to the Content Tree & manipulate what is & isn't available? Or even bind to the editContent.aspx page (is it possible to stop an action from happening, and return an error message - e.g. "Sorry, you can't delete this")

    Thanks for reading through this convoluted question. Any replies would be much appreciated.

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Dec 08, 2010 @ 15:25
    Tim
    0

    It is possible to stop events and stop actions from happening. If you have a look at the umbraco.tv videos on event handlers, they've got some great examples on how to cancel events etc. It should be possible to hook in and do what you're after I think.

    You can hook into the content tree easily enough as well, I've done stuff before where I remove menu options for certain sections of the site (if I have a settins section on the site for example, I disable all options apart from reload nodes). There's a very basic example of this in the Wiki, here:

    http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples/remove-context-menu-items

    Hope that helps!

    Tim.

     

Please Sign in or register to post replies

Write your reply to:

Draft