Loads the permission of the given IIdentity object.
Namespace: Novalys.VisualGuard.SecurityAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2017.0.101.17 (2017.0.101.17)
Syntax
C# |
---|
public VGAuthorizationState LoadSecurity( IIdentity vgIdentity ) |
Visual Basic |
---|
Public Function LoadSecurity ( vgIdentity As IIdentity ) As VGAuthorizationState |
Parameters
- vgIdentity
- Type: System.Security.Principal..::..IIdentity
Return Value
Type: VGAuthorizationStateA VGAuthorizationState representing the state of the authorization
Remarks
If a user has more than one role in the application, you can use the PermissionsLoading event to allow the user to select a role in the granted roles list.
By default, Visual Guard will create permission set that will be a union of all permision sets granted to the roles.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | identity or identity.Name is null. |
System..::..ArgumentException | The identity.Name is longer than 64 characters The identity.Name is empty. |
Novalys.VisualGuard.Security..::..VGConfigurationException | The configuration file is not valid
or A problem occurs during the connection to the repository.or The version of the repository or the version of the permissions is not supported by the application. |