Authorization
Hi,
well im working on an application which uses windows authentication....
the problem is that the user roles and permissions are stored in a SQL database .... I have retrieved the role and permission but im not sure if it is the way it is supposed to be done.... please could u check my code and tell me what is wrong ..... and what i should do to correct it...
the code is as follows:i am calling the method getUserRoles() from the global.asax.cs.....is there a better way to do it .....please help......
namespace Aztec.Track.IdentityManager
{
public class Login
{
public Login()
{
}
public void getUserRoles()
{
string[] UserName;
ArrayList UserRoles=new ArrayList();
ArrayList UserPermissions=new ArrayList();
WindowsIdentity UserIdentity =WindowsIdentity.GetCurrent();
UserName=UserIdentity.Name.Split('\\');
ProjectDetails projectdetails=new ProjectDetails();
UserRoles=projectdetails.getUserRole(UserName[1]);
for(int i=0;i<UserRoles.Count;i++)
{
UserPermissions.Add(projectdetails.getPermissions( UserRoles[i].ToString()));
}
}}
achhetri
__________________
achhetri
|