Turning off workflow and content approval for Document and Image libraries in Sharepoint 2007

I often get the question of how to turn off content approval for a publishing portal w/workflow.  Most of the time this request comes because an administrator or content editor is working on the portal and it has not yet been released to production.  During this process there are many pages and images that need to be created/uploaded.  Requiring content approval on these pages when the content creator and approver are the same person can be a time intensive process with no added value.  In order to turn this off, go to the library, select settings/document library settings/versioning settings and set "Require content approval for submitted items?" to "No".  There is no need to actually remove the workflow from the library because it will not be required to start once this setting is disabled.  Turning the workflow back on for production is as simple as flipping the switch back to "Yes".

Comments

  • Anonymous
    September 03, 2009
    ..programmatically turn off approval workflow on pages libarry - easy to modify to other lists. static void Main(string[] args) {  using (SPWeb web = new SPSite("http://sitecol").OpenWeb())  {   TurnApprovalOff(web);  } } private static void TurnApprovalOff(SPWeb web) { PublishingWeb pWeb = PublishingWeb.GetPublishingWeb(web); SPList list = pWeb.PagesList; list.EnableModeration = false; list.Update(); foreach (SPWeb subWeb in web.Webs)  TurnApprovalOff(web); }