Showing posts with label Did you know?. Show all posts
Showing posts with label Did you know?. Show all posts

Prevent making changes to WSS content types.

Posted by Kasi Krishnamoorthy at 7/09/2009 03:20:00 PM

 

There are three ways you can prevent users from making changes to SharePoint (WSS) content types. Also there are few things to consider before taking these steps.

1: Read-Only content types:

You can set it read-only using the interface, like this..

image

But once you set it read-only, then:

  • You cannot make changes to the content type thro WSS interface.
  • YOU CAN only make Changes programmatically using object model.
  • Pushing down parent content type changes (if any) is little tricky.

2. Sealed Content Type.

This provides more control, but a content type can only be made sealed type by editing the XML definition of the content type.

But once you set it sealed, then:

  • You cannot make changes to the content type thro WSS interface.
  • You cannot make changes programmatically using object model.
  • Pushing down parent content type changes to the sealed content type is not possible.

3. Hidden type.

You can assign a content type to a predefined group called, “_Hidden” (case sensitive). You can set it as shown below..

image

But once you set it to hidden group, then:

  • Hidden types are not visible, so you cannot make changes to the content type thro WSS interface.
  • You can make changes programmatically using object model ( including inheriting).
  • Pushing down parent content type changes to the child content type is possible.

For hidden , see here for more information. Content Type Access Control

Hope it helps.

Deleting content type…

Posted by Kasi Krishnamoorthy at 7/08/2009 10:30:00 AM

In SharePoint 3.0, Can you delete a content type, if it is being used in other site or list ? No, you cannot. We know that we can create a content type based on other content type and each content type contains reference to the content type on which it is based on. SharePoint checks that before deleting a content type whether it is being used somewhere as a base of content type. You have to remove first the content type from all lists and sites that are using it.   But, the good thing is , WSS won’t consider the items ( that are using the deleted content type) in the recycle bin. So when you try to restore the list item after their content type has been deleted, the list items are assigned to default content type ( instead of giving strange error like “content type not found”.)