VGPermissionsLoadingEventArgs Class |
Namespace: Novalys.VisualGuard.Security
The VGPermissionsLoadingEventArgs type exposes the following members.
Name | Description | |
---|---|---|
VGPermissionsLoadingEventArgs | Initializes a new instance of the VGPermissionsLoadingEventArgs class with an action, the node it was performed upon, and the parent node. |
Name | Description | |
---|---|---|
Identity | Gets the IIdentity representing the user for which the permission will be loaded. | |
RepositoryId | Gets the Visual Guard Repository Id of the user for which the permission will be loaded. | |
Roles | Gets or sets the list of VGGrantedRole corresponding to roles granted to the user. | |
Status | Gets or sets the VGAuthorizationStatus representing the status of the current authorization process. |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
private void OnPermissionLoading (object sender, VGPermissionsLoadingEventArgs args) { if (e.Roles.Length > 0) SelectRoleForm form = new SelectRoleForm(); form.Roles = e.Roles; if (form.ShowDialog() == DialogResult.OK) { e.Roles = form.Roles; } else { e.Status = VGAuthorizationStatus.Failure | VGAuthorizationStatus.ProcessCanceled; } } }