This project is read-only.
Go Site Actions->Site Settings and under the Galleries section click on Provisioner Scripts. Then make sure you add the following one item for each template that you want to secure:
  • Web Templates column. Here you must specify the WebTemplate name of the site being used followed by a # and the Configuration of the template (WebTemplate#Configuration):
- You can determine this information by opening an instance of SharePoint Manager 2010 and browsing to the Site and accessing the Properties Tab in SharePoint 2010 Manager.
- For sites provisioned from Site Templates in SP2010 (Site Template User Solutions), the name to be matched is the name of the Solution itself. E.g. specify projectsite1.wsp for a site template that was saved as projectsite1. Case is sensitive
  • Script to Execute column. This is the xml that the provisioner uses. It is further explained below in the Schema section.

<Provisioner ShowErrors="true" ApplyWebTemplate="TemplateName.stp" ReopenWebs="false">
  <FixupWebACL RespectInheritanceSetting="false" RoleAssignments="BreakClean" SyncGroupQuickLaunch="true" InheritTopNav="true">
    <SiteGroup Action="Create" Name="{{SPWeb.Title}} Owners" Description="Test - {{SPWeb.Description}}" AllowMembersEditMembership="true" AllowRequestToJoinLeave="true" AutoAcceptRequestToJoinLeave="true" OnlyAllowMembersViewMembership="false" RequestToJoinLeaveEmailSetting="" Owner="WSS-SERVER\administrator" />
    <SiteGroup Action="Create" Name="{{SPWeb.Title}} Members" />
    <AssociateSiteGroup Name="{{SPWeb.Title}} Owners" Role="Owner" />
    <AssociateSiteGroup Name="{{SPWeb.Title}} Members" Role="Member" />
    <File Path="Pages/Default.aspx">
      <WebPart Title="I need to...">
        <SetProperty Name="TasksAndToolsWebUrl" Value="{{SPWeb.ServerRelativeUrl}}" />
      <WebPart Title="[Sector Name] News">
        <UpdateTitle Set="{{SPWeb.Title}} News" />
        <SetListViewAndToolbar List="SectorNew" View="Homepage View" Toolbar="Freeform" />
    <List Title="[Sector Name] Calendar" EMailEnable="administrator">
      <UpdateTitle Set="{{SPWeb.Title}} Calendar" />
      <UpdateQuickLaunch Set="true" />
      <ListItem Type="Folder" Name="Test1">
        <FixupACL RoleAssignments="BreakClean">
          <PrincipalRole Action="Add" Name="Proposal - {{SPWeb.Title}} Owners" Type="SiteGroup" Role="Full Control" />
      <ListItem Type="File" Name="image001.jpg">
        <FixupACL RoleAssignments="BreakClean">
          <PrincipalRole Action="Add" Name="Proposal - {{SPWeb.Title}} Owners" Type="SiteGroup" Role="Full Control" />
      <ListItem Type="Item" ID="4">
        <FixupACL RoleAssignments="BreakClean">
          <PrincipalRole Action="Add" Name="Proposal - {{SPWeb.Title}} Owners" Type="SiteGroup" Role="Full Control" />
    <List Title="Documents" EnableContentTypes="true">
        <ContentTypeRef ID="0x01010019B10C4E56F44A46805E49D1A46F0D50" />
      <ReorderCTypes />
        <Field AddToDefaultView="true">
          <![CDATA[<Field Type="Rating" DisplayName="LearningNetworkRatings" Required="FALSE" Group="Learning Network Columns" ID="{ae264660-e5cf-4b16-bb87-92d6a179c4cb}" SourceID="{c441cfbf-bad8-4e7d-adfe-3b8c909fe4e4}" StaticName="LearningNetworkRatings" Name="LearningNetworkRatings" Decimals="1" Version="4" ColName="float1" RowOrdinal="0" AllowComments="TRUE"><Customization><ArrayOfProperty><Property><Name>CommentsUrl</Name></Property><Property><Name>RateUrl</Name></Property><Property><Name>AllowComments</Name><Value xmlns:q1="" p4:type="q1:boolean" xmlns:p4="">true</Value></Property></ArrayOfProperty></Customization></Field>]]>
  <SetStyling SiteLogoUrl="/_layouts/IMAGES/PS_CI_Intranet/CI_Logo_Horiz.gif"></SetStyling>
    <Template LCID="1033">STS#0</Template>
    <Web Title="Sub Web1" Description="Blah" Template="STS#0" Url="subweb1" LCID="1033" UniquePermissions="true" InheritTopNav="true" />
    <Web Title="Sub Web2" Template="STS#0">
      <Web Title="Sub Web to Sub Web2" Template="STS#0" />

Order of Evaluation
As a whole, the provisioner script is evaluated in the following chunks:
  1. ApplyWebTemplate
  2. ReopenWebs- Reopens an SPWeb if set to true
  3. RestoreWebProperties
  4. RestoreCss
  5. FixupWebACL
  6. FixupFiles
  7. FixupLists
  8. RestrictSiteTemplates
  9. ProvisionWebs

NOTE: Within each of the chunks, evaluation for children Elements is in the order of declaration. Any Attributes are typically evaluated before children Elements unless sepcifically noted in the spec. Not all live fields are supported.

Last edited Jun 26, 2012 at 8:41 PM by valorekhov, version 12


No comments yet.