Copied to clipboard

Flag this post as spam?

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


  • Zugbo 7 posts 28 karma points
    Sep 07, 2011 @ 17:44
    Zugbo
    0

    Disable save controls through event

    I'm trying to set up per-node editor security for a large tree and number of editors, so the Users2NodePermission table is not going to work for me. I'm trying to come up with an event-driven system where I prevent disallowed actions, and that's easy enough, but now I'm trying to remove the buttons for these actions from the UI.

    I know I can edit the context menu on content nodes, and prevent nodes from appearing, but I'd like the users to have read only access to some nodes, so: 

    Is it possible to use an event (or some other non-invasive method) to disable the save/publish controls on the top of the edit page once a node has been selected? 

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Sep 07, 2011 @ 20:59
    Dirk De Grave
    0

    Zugbo,

    Daunting task.... you can subscribe to page events and check whether editContent.aspx is being requested, and if so... disable the save/publish button... If you have access to umbraco.tv, there's a nice intro video on this subject.

    But: even if you can subscribe to the page init event and find the menu, you can't really access the menu bar items, as it's readonly :(

    But 2: there's always a workaround, you could inject some javascript to disable or hide these specific buttons. For some inspiration, have a look at uBrokeIt package, which does something similar (and really cool)

    Hope this helps.

    Regards,

    /Dirk

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies