Checks whether the specified permission is granted to the principal.
true if the principal has the permission, false otherwise
this method is not case sensitive
The following example checks whether the permission "My permission" stored in the root of permissions is granted to the current user.
[Visual Basic]
If not VGSecurityManager.Principal.HasPermission("My permission") Then
' the permission is not granted ...
End If
[C#]
if (!VGSecurityManager.Principal.HasPermission("My permission"))
{
// the permission is not granted ...
}
The following example checks whether the permission "Disable Edition" contained in the folder "Customer" is granted to the current user.
VGSecurityManager.Principal.HasPermission("\Customers\Disable Edition")
VGIPrincipal Interface | Novalys.VisualGuard.Security Namespace | VGIPrincipal.HasPermission Overload List