Hi guys,
I have a asp.net website in c#.
Where i have created a class for Security.
for eg: i have department and branch page.
In Security_Bl i have declare four public members for dept n branch.
Security_Bl.class
public static bool deptInsert { get; set; }
public static bool deptView { get; set; }
public static bool deptUpdate { get; set; }
public static bool deptDelete { get; set; }
public static bool BranchInsert { get; set; }
public static bool BranchView { get; set; }
public static bool BranchUpdate { get; set; }
public static bool BranchDelete { get; set; }
if (dt.Rows[0]["Module"].ToString() == "dept")
{
deptInsert = Convert.ToBoolean(dt.Rows[0]["OptInsert"].ToString());
deptView = Convert.ToBoolean(dt.Rows[0]["OptView"].ToString());
deptUpdate = Convert.ToBoolean(dt.Rows[0]["OptUpdate"].ToString());
deptDelete = Convert.ToBoolean(dt.Rows[0]["OptDelete"].ToString());
}
if (dt.Rows[1]["Module"].ToString() == "Branch")
{
BranchInsert = Convert.ToBoolean(dt.Rows[1]["OptInsert"].ToString());
BranchView = Convert.ToBoolean(dt.Rows[1]["OptView"].ToString());
BranchUpdate = Convert.ToBoolean(dt.Rows[1]["OptUpdate"].ToString());
BranchDelete = Convert.ToBoolean(dt.Rows[1]["OptDelete"].ToString());
}
department.cs
public bool deptInsert = Security_Bl.deptInsert ;
public bool deptView = Security_Bl.deptView ;
public bool deptUpdate = Security_Bl.deptUpdate ;
public bool deptDel = Security_Bl.deptDelete;
protected void Page_Load(object sender, EventArgs e)
{
if(deptview)
{
if(!ispostback)
{
.............
}
}
}
this application is published and currently running on internet.
one user have permission to view dept page n one doesn't have.
But when both the users login/working at the same time n other user which do not have
permission to view.. he can also view that page.
is this the problem with class or something else.
can any one please help me.
Thanks