RoleAssignment

RoleAssignment

With RoleAssignment you can assign permission levels to the resource, such as a SharePoint Group
An example of a template can be found here.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<Site Url="{url}" Title="{title}" Template="STS#3" LCID="1033" OwnerLogin="{owner}" UserCodeQuota="0" StorageQuota="0" DenyAddAndCustomizePages="Disabled">
    <RootWeb Url="{url}" Title="{title}" Description="{description}" Template="STS#3" LCID="1033" HasUniqueRoleAssignments="true">
        <RoleDefinitions>
            <RoleDefinition Name="ProjectManagers" BasePermissions="ManageWeb"/>
        </RoleDefinitions>      
        <Groups>
            <Group Name="{title} ProjectManagers" Owner="{owner}" AllowMembersEditMemberships="true">
                <Users>
                    <User LoginName="{owner}"/>
                </Users>
            </Group>
        </Groups>
        <RoleAssignments>
            <RoleAssignment PrincipalName="{title} ProjectManagers" PrincipalType="SharePointGroup" PrincipalSource="UserInfoList">
                <RoleDefinitionBindings>
                    <RoleDefinition Name="ProjectManagers"/>
                </RoleDefinitionBindings>
            </RoleAssignment>
        </RoleAssignments>
    </RootWeb>
</Site>
What's on this Page