VGIPermissionAttributeValue Property |
Namespace: Novalys.VisualGuard.Security
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'"); }