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?
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)
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?
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
is working on a reply...