3

I created a library with document set content type. I also enabled 2 custom content types for documents.

However, I want the users only to be able to create document sets in the library, and inside the document sets, the documents.

People are still creating documents, on the document library root.

How can I avoid this?

2
+50

Option 1: You could just remove creating new item permissions on that list, by breaking role inheritance for that list.

Option 2: Add event receiver on ItemAdding event and cancel item creation process by setting SPItemEventProperties.Cancel = true;. Examples are on the web.

Option 3: You can customize the Toolbars by following this link. http://blogs.msdn.com/b/syedi/archive/2008/07/19/customizing-the-list-toolbar-template-wss-3-0-moss.aspx

Link is for WSS 3.0 and MOSS, but I think you can do it for SP 2013 by replacing 12 to 15 in folder paths. I haven't tested my self

3

Edit the library web part and change Toolbar Type to 'No Toolbar'

This may not work in all cases, particularly if there are aspects of the toolbar you would like to keep.

1

I don't think you can prevent it out right, but could you put a ItemAdding event receiver on the document library root to cancel any upload attempts?

Feels kind of messy and a fairly poor user experience, but should do what you need.

0

You can just remove the Document Content Type from the list settings. What is allowed inside Document Sets is maintained within that Content Type.

  • Hello Marc, I just verified, and its already setup that way. However, the new Document option still appears on the listview (Allitems.aspx) and on the ribbon people can still see the Upload Document button. – Luis Valencia Dec 13 '13 at 17:03
0

Go to library settings -->Change new button order and default content type --> Content Type Order--> unselect the document content type

  • There is no "Document content type" in library settings, only "Document Set" one. – user28285 Jun 2 '14 at 14:43
0

Above didn't work for me either. The workaround I used is: - Go to list settings >> Advanced and set "Launch forms in a dialog?" to No - Go to list, Files in toolbar, New Documents and select document type - Copy URL - Create web part page and add List as wwebpart - Edit List Web Part settings and set to no toolbar - Above list add content editor web part - Click inside content editor, go to insert in toolbar, and choos embed Code - type in the following: Add New - Click OK - Set title to " " and set chrome type to no title no border - Click OK

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.