Share via


Permissions.RemovePermissionCollection, méthode (websvcPermissions)

Removes permissions from the list for the specified members.

Espace de noms : websvcPermissions
Assembly : STSSOAP (dans stssoap.dll)

Syntaxe

'Déclaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemovePermissionCollection", RequestNamespace:="https://schemas.microsoft.com/sharepoint/soap/directory/", ResponseNamespace:="https://schemas.microsoft.com/sharepoint/soap/directory/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Sub RemovePermissionCollection ( _
    objectName As String, _
    objectType As String, _
    memberIdsXml As XmlNode _
)
'Utilisation
Dim instance As Permissions
Dim objectName As String
Dim objectType As String
Dim memberIdsXml As XmlNode

instance.RemovePermissionCollection(objectName, objectType, memberIdsXml)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemovePermissionCollection", RequestNamespace="https://schemas.microsoft.com/sharepoint/soap/directory/", ResponseNamespace="https://schemas.microsoft.com/sharepoint/soap/directory/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public void RemovePermissionCollection (
    string objectName,
    string objectType,
    XmlNode memberIdsXml
)

Paramètres

  • 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:

    <Members>
       <Member ID="ID1" />
       <Member ID="ID2" />
       .
       .
       .
    </Members>
    

Notes

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

Exemple

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);

Voir aussi

Référence

Permissions, classe
Membres Permissions
websvcPermissions, espace de noms