Copied to clipboard

Flag this post as spam?

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


  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Oct 19, 2009 @ 09:03
    Sebastiaan Janssen
    0

    Prevent editors from deleting folders in the media section

    Can I prevent my editors from deleting full folder from within the media section? They are allowed to delete normal media items, just nog the folders? 

    Some pointers on where to hook into Umbraco would be great, thanks!

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Oct 19, 2009 @ 09:43
    Dirk De Grave
    0

    Sebastiaan, you could easily build an event handler for that (register for media beforeDelete event), cancel event if an editor is trying to delete a folder! Showing an info/error message may be trickier tho!

     

    Cheers,

    /Dirk

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Oct 19, 2009 @ 09:44
    Ismail Mayat
    0

    Sebastiaan,

    If you are using umbraco v4 then you will have events for the pre delete media event thus you could write actionhandler for this event then check if user belongs to editor group and stop the delete if they are see http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events and http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events for more information.

    Regards

    Ismail

  • 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