Edit

Share via


UserPermission.Permission Property

Definition

Gets or sets a value representing the permissions on the current form assigned to the user associated with an instance of the UserPermission class.

public:
 abstract property Microsoft::Office::InfoPath::PermissionType Permission { Microsoft::Office::InfoPath::PermissionType get(); void set(Microsoft::Office::InfoPath::PermissionType value); };
public abstract Microsoft.Office.InfoPath.PermissionType Permission { get; set; }
member this.Permission : Microsoft.Office.InfoPath.PermissionType with get, set
Public MustOverride Property Permission As PermissionType

Property Value

One or a combination of PermissionType constants.

Examples

In the following example, clicking the Button control gets the specified user from UserPermissionsCollection for the current form, and then displays that user's permissions.

public void CTRL1_Clicked(object sender, ClickedEventArgs e)
{
   UserPermission thisUser = 
      Permission.UserPermissions["someone@example.com"];
   MessageBox.Show(thisUser.Permission.ToString());
}
Public Sub CTRL1_Clicked(ByVal sender As Object, _
   ByVal e As ClickedEventArgs)
   UserPermission thisUser = _
      Permission.UserPermissions("someone@example.com")
   MessageBox.Show(thisUser.Permission.ToString())
End Sub

Remarks

An instance of the UserPermission class associates a set of permissions on the current form with a single user and an optional expiration date. The Permission property gets or sets the set of user permissions specified by this UserPermission object. While some permissions granted through the user interface apply to all users, you can use the UserPermission object to assign them on a per-user basis with per-user expiration dates.

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.

Applies to