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