Compartilhar via


Permission.UserPermissions Propriedade

Definição

Obtém um UserPermissionCollection para o formulário atual.

public:
 abstract property Microsoft::Office::InfoPath::UserPermissionCollection ^ UserPermissions { Microsoft::Office::InfoPath::UserPermissionCollection ^ get(); };
public abstract Microsoft.Office.InfoPath.UserPermissionCollection UserPermissions { get; }
member this.UserPermissions : Microsoft.Office.InfoPath.UserPermissionCollection
Public MustOverride ReadOnly Property UserPermissions As UserPermissionCollection

Valor da propriedade

Uma UserPermissionCollection coleção que representa os usuários e suas permissões para o formulário atual.

Exemplos

No exemplo a seguir, clicar no controle Botão obtém o UserPermissionsCollection para o formulário atual, adiciona e atribui um usuário ao nível de acesso Alterar e define uma data de validade de dois dias a partir da data atual.

public void CTRL1_Clicked(object sender, ClickedEventArgs e)
{
   string strExpirationDate = DateTime.Today.AddDays(2).ToString();
   DateTime dtExpirationDate = DateTime.Parse(strExpirationDate);

   this.Permission.UserPermissions.Add("someone@example.com", 
      PermissionType.Change, dtExpirationDate);
}
Public Sub CTRL1_Clicked(ByVal sender As Object, _
   ByVal e As ClickedEventArgs)
   Dim strExpirationDate As String = _
      DateTime.Today.AddDays(2).ToString()
   dtExpirationDate As DateTime = DateTime.Parse(strExpirationDate)

   Me.Permission.UserPermissions.Add("someone@example.com", _
      PermissionType.Change, dtExpirationDate)
End Sub

Comentários

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Aplica-se a