Share via


Permissions.UpdatePermission, méthode (websvcPermissions)

Modifies site-level permissions for the specified site group, or modifies permissions to the list for the specified user, site group, or cross-site group.

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

Syntaxe

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

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

Paramètres

  • objectName
    A string that contains the name of the list or site.
  • objectType
    A string that specifies either List or Web.
  • 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). The user or cross-site group must be valid, and the site group must already exist on the site.
  • permissionMask
    A 32-bit integer that specifies the new permission mask (for example, 134284064). The GetPermissionCollection can be used to return the permissions for the site or list.

Notes

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

Exemple

The following code example modifies the permissions for a site group on the current site.

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

permService.UpdatePermission("Site_Name", "Web", "Site_Group", "role", 134283265)
Web_Reference_Folder_Name.Permissions permService = new Web_Reference_Folder_Name.Permissions();
permService.Credentials= System.Net.CredentialCache.DefaultCredentials;

permService.UpdatePermission("Site_Name", "Web", "Site_Group", "role", 134283265);

Voir aussi

Référence

Permissions, classe
Membres Permissions
websvcPermissions, espace de noms