Copied to clipboard

Flag this post as spam?

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


  • Ryios 122 posts 263 karma points
    May 22, 2014 @ 20:12
    Ryios
    0

    Programatically Create Sealed Document Types

    I'm trying to determine if there is anyway to create a DocumentType in Application Startup that cannot be deleted via the BackOffice UI.

    My basic vision is to define in code a set of document types for a site we are working on that is managed in Source Control and has multiple developers. But will eventually be used by front end users to create content. We want them to be able to use the document types we defined, but not be able to delete them without relying on permissions.

    In short we'd like to straight up disable the UI's ability to Delete our document types.

    Now I know I can create a Custom Section with IApplication and have done so. But I am not sure I can store my Document Types in my custom section. If I could I would have control over the UI for editing/adding them etc. But I'm pretty sure a Node created in a Custom Section cannot be the same as a Document Type.

    Or If I allowed my custom section to create document types, they would probably show up in the other section.

    Or maybe I could hide the Out of the box document type section from the back office or disable it and have my own.

    I want to do the same thing with DataTypes.

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 8x c-trib
    May 23, 2014 @ 11:10
    Lars-Erik Aabech
    0

    This is not an exact answer to your question, but:
    If you're using source control (I hope so) you can have your document types in SC by using the uSync package:
    http://our.umbraco.org/projects/developer-tools/usync

  • Ryios 122 posts 263 karma points
    May 24, 2014 @ 07:20
    Ryios
    0

    Thanks,

    That's neat for other issues, but doesn't solve my main concern.

    We want to create document types that are managed with our code and cannot be manipulated in the UI. I think I can do it with permissions, we'll settle for that for now.

    Would be really nice if Document Types and DataTypes had some UICanDelete, UICanEdit, UICanView, etc properties.

Please Sign in or register to post replies

Write your reply to:

Draft