Defines all the authorization status

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)

Syntax

C#
[FlagsAttribute]
public enum VGAuthorizationStatus
Visual Basic (Declaration)
<FlagsAttribute> _
Public Enumeration VGAuthorizationStatus

Members

Member nameDescription
Failure
The authorization fails.
UserNotFound
The authorization fails. The user is not found in the repository
UserNotAuthorized
The authorization fails. The user does not have any granted role for the application.
ProcessCanceled
The authorization fails. The authorization process has been canceled by the user.
Success
The authorization succeeds.
VersionNotCompatible
The version of the permissions is not compatible with the application.

Remarks

Since Status can be a combination (bit-flag) of enum values, you can't use the equality operator to compare them. To test if an authorization has failed, you must use this syntax:
CopyC#
if ((status & VGAuthorizationStatus.Failure) == VGAuthorizationStatus.Failure)
{
    // Authentication has failed
    if ((status & VGAuthorizationStatus.UserNotFound) == VGAuthorizationStatus.UserNotFound)
    {
        // The user is not found in the repository ...
    }
}
CopyVB.NET
if (status And VGAuthorizationStatus.Failure) = VGAuthorizationStatus.Failure Then
    ' Authentication has failed
    if (status And VGAuthorizationStatus.UserNotFound) = VGAuthorizationStatus.UserNotFound Then
        ' The user is not found in the repository ...
    End If
End If

See Also