Row level data access
Posted by z Jean-jacques Jouanneaux on 26 August 2010 04:40 PM

Can your application control row level data access? Example: A combobox contains a list of departments. Is there any way to control the contents of this list with permissions, so that different users get different lists. If this requires coding in the application to handle the logic, how do we access the permissions data in the program.

There are several options:

1. It is possible to filter data of a dataview or change the "where" clause of an SQL Query by adding a security action that will change the Filter property of the object.

2. In some cases, you can test the permission in your code.

This example shows how to determine whether the permission "Display only information on a country" is granted to the current user and how to get the value of the argument "Country".

If Not VGSecurityManager.Principal.HasPermission("Display only information on a country") Then
MessageBox.Show("The current user can see all countries")
Dim myPerm As VGIPermission = VGSecurityManager.Principal.GetPermission("Display only information on a country")
Dim myValue As String = CType(myPerm("Country"), String)
MessageBox.Show(String.Format("The current user can see only information about the country '{0}'", myValue))
End If

The following link shows the different ways to implement the security in your application:

Visual Guard

(0 vote(s))
Not helpful

Comments (0)
Help Desk by Novalys