Role-Based Security


The following code extracts from the database the list of application-defined roles associated with the logged-on user strUserName. The list is stored in the string array strRoles:

strRoles = RoleBasedSecurity.LoadRoles(strUserName)

The next line of code shown assigns the Principal for strUserName—containing the user name and associated roles—to the current thread:

RoleBasedSecurity.SetPrincipalPolicy strUserName 




Security for Microsoft Visual Basic  .NET
Security for Microsoft Visual Basic .NET
ISBN: 735619190
EAN: N/A
Year: 2003
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net