Permissions.RemovePermissionCollection Method
Windows SharePoint Services 3
Removes permissions from the list for the specified members.
Web Service: PermissionsWeb Reference: http://<Site>/_vti_bin/Permissions.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/directory/RemovePermissionCollection", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/directory/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/directory/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] public void RemovePermissionCollection ( string objectName, string objectType, XmlNode memberIdsXml )
Parameters
- objectName
A string that contains the name of the list.
- objectType
A string that specifies List.
- memberIdsXml
An XML fragment in the following format that specifies the permissions to remove and that can be passed as a System.Xml.XmlNode object:
To access the Permissions service and its methods, set a Web reference to http://Server_Name/[sites/][Site_Name/]_vti_bin/Permissions.asmx. This example requires that a using (C#) or Imports (Microsoft Visual Basic) directive be included for the System.Xml namespace
The following code example removes a specified collection of permissions from a list. The example assumes the existence of a local XML file that specifies the IDs of members to remove, which are loaded into a System.Xml.XmlDocument object.
Web_Reference_Folder_Name.Permissions permService = new Web_Reference_Folder_Name.Permissions(); permService.Credentials= System.Net.CredentialCache.DefaultCredentials; XmlDocument myDocument = new XmlDocument(); myDocument.Load("C:\\\\File_Name.xml"); XmlNode ndPermissions = myDocument.DocumentElement; permService.RemovePermissionCollection("List_Name", "List", ndPermissions);