Permissions.RemovePermissionCollection method

Removes permissions from the list for the specified members.

Namespace:  WebSvcPermissions
Assembly:  STSSOAP (in STSSOAP.dll)

Syntax

'Declaration
<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 Sub RemovePermissionCollection ( _
    objectName As String, _
    objectType As String, _
    memberIdsXml As XmlNode _
)
'Usage
Dim instance As Permissions
Dim objectName As String
Dim objectType As String
Dim memberIdsXml As XmlNode

instance.RemovePermissionCollection(objectName, _
    objectType, memberIdsXml)
[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
    Type: System.String

    A string that contains the name of the list.

  • memberIdsXml
    Type: System.Xml.XmlNode

    An XML fragment in the following format that specifies the permissions to remove and that can be passed as a System.Xml.XmlNode object:

Remarks

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

Examples

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.

Dim permService As New Web_Reference_Folder_Name.Permissions()
permService.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim myDocument As New XmlDocument()
myDocument.Load("C:\\File_Name.xml")

Dim ndPermissions As XmlNode = myDocument.DocumentElement

permService.RemovePermissionCollection("List_Name", "List", ndPermissions)
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);

See also

Reference

Permissions class

Permissions members

WebSvcPermissions namespace