Click or drag to resize

VGIPermissionAttributeValue Property

Gets or sets the value of the attribute.

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax
Object Value { get; set; }

Property Value

Type: Object
Examples

This example modify the argument Country of the permission '\Common\Display only information on a country'

Guid PermId = new Guid("975d80d8-b23f-4226-8cc8-ce2965e59e8c");
// Id of the permission "\Common\Display only information on a country"
// Checks if the permission is granted to the current user and gets the argument value assign to this permission
if (!VGSecurityManager.Principal.HasPermission(PermId))
{
    MessageBox.Show("The permssion '\\Common\\Display only information on a country' is not granted to the current user");
}
else
{
    VGIPermission myPerm = VGSecurityManager.Principal.GetPermission(PermId);
    VGIPermissionAttribute attr = myPerm.Attributes.GetAttributeByName("Country");
    attr.Value = "France";
    MessageBox.Show("The current user can now see information about the country 'France'");
}
See Also