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: 2019.1.831.19 (2019.1.0831.19)
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
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(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