This topic has not yet been rated - Rate this topic

Permissions.RemovePermission Method

Windows SharePoint Services 3
Removes the specified permission from the list.

Web Service: PermissionsWeb Reference: http://<Site>/_vti_bin/Permissions.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/directory/RemovePermission", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/directory/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/directory/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public void RemovePermission (
	string objectName,
	string objectType,
	string permissionIdentifier,
	string permissionType
)

Parameters

objectName

A string that contains the name of the list.

objectType

A string that specifies List.

permissionIdentifier

A string that contains the name of the site group, the name of the cross-site group, or the user name (DOMAIN\User_Alias) of the user to whom the permission applies.

permissionType

A string that specifies user, group (cross-site group), or role (site group).

To access the Permissions service and its methods, set a Web reference to http://Server_Name/[sites/][Site_Name/]_vti_bin/Permissions.asmx.

The following code example removes the permission to a list for the specified user.

Web_Reference_Folder_Name.Permissions permService = new Web_Reference_Folder_Name.Permissions();
permService.Credentials= System.Net.CredentialCache.DefaultCredentials;

permService.RemovePermission("List_Name", "List", "Cross-site_Group", "group");
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ