Share via


SharePoint Provider::UpdateWebPermisions

Modifies site-level permissions for the specified collection of existing site groups.

Arguments

Input Arguments Required Description

<target>

Yes

The Windows SharePoint Services site to modify.

<Permissions>

Yes

An XML fragment in the format shown below. You may set a role's PermissionMask to 0 if desired, but you must use the Users and Groups API to remove a role completely.

Note

The value of the PermissionMask are taken from the Microsoft.SharePoint.SPRights enumeration in the Windows SharePoint Services object model.

UpdateWebPermissions supports rollback.

Attempts to modify the Administrator or Guest roles fail, and produce the misleading error: "Cannot complete this action. Please try again."

Permissions which do not correspond to standard Windows SharePoint Services permissions may provoke unpredictable errors from Windows SharePoint Services.

Remarks

No remarks.

Sample Code

Example XML Request

<request> 
    <procedure> 
 
        <execute namespace="WSS Provider" procedure="UpdateWebPermissions" 
 
                   impersonate="1"> 
 
            <executeData> 
 
                <target>https://raven003/sites/test</target> 
 
                <Permissions> 
 
                    <Roles> 
 
                        <Role RoleName="Web Designer" PermissionMask="1029638927" /> 
 
                        <Role RoleName="Contributor" PermissionMask="1027801615" /> 
 
                        <Role RoleName="TestRole" PermissionMask="1208025088" /> 
 
                        <Role RoleName="TestPermRole" PermissionMask="138608641" /> 
 
                        <Role RoleName="Reader" PermissionMask="138608641" /> 
 
                    </Roles> 
 
                </Permissions> 
 
            </executeData> 
 
        </execute> 
 
    </procedure> 
 
</request> 

Example XML Response

No example XML response.

Typical C# Usage

No typical C# usage.

Applies To

Windows SharePoint Services Provider API for

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

SharePoint Provider::GetWebs