Click or drag to resize

VGPermissionsLoadingEventArgs Class

Provides data for the PermissionsLoading event.
Inheritance Hierarchy
SystemObject
  SystemEventArgs
    Novalys.VisualGuard.SecurityVGPermissionsLoadingEventArgs

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2018.1.720.18 (2018.1.0720.18)
Syntax
public class VGPermissionsLoadingEventArgs : EventArgs

The VGPermissionsLoadingEventArgs type exposes the following members.

Constructors
  NameDescription
Public methodVGPermissionsLoadingEventArgs

Initializes a new instance of the VGPermissionsLoadingEventArgs class with an action, the node it was performed upon, and the parent node.

Top
Properties
  NameDescription
Public propertyIdentity

Gets the IIdentity representing the user for which the permission will be loaded.

Public propertyRepositoryId

Gets the Visual Guard Repository Id of the user for which the permission will be loaded.

Public propertyRoles

Gets or sets the list of VGGrantedRole corresponding to roles granted to the user.

Public propertyStatus

Gets or sets the VGAuthorizationStatus representing the status of the current authorization process.

Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Examples
This example display how to use the event PermissionsLoading to allow the user select a roles in the list of granted roles.
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;
        }
    }
}
See Also