C Sharp Login with different user privilege
-
Hello I have an application that is basically built on Tab control. I have 8 tabs and i need to have different domains(e.g Admin, clerk, bursar, secretary) on my login where when a user under a specific domain clicks on a certain tab, an event is generated that prevents him from viewing the content of that tab Any advice please???
-
Hello I have an application that is basically built on Tab control. I have 8 tabs and i need to have different domains(e.g Admin, clerk, bursar, secretary) on my login where when a user under a specific domain clicks on a certain tab, an event is generated that prevents him from viewing the content of that tab Any advice please???
It will be better to define different roles & privileges; Then we can show / hide different tabs based on the privileges of the logined user.
-
It will be better to define different roles & privileges; Then we can show / hide different tabs based on the privileges of the logined user.
-
Hello I have an application that is basically built on Tab control. I have 8 tabs and i need to have different domains(e.g Admin, clerk, bursar, secretary) on my login where when a user under a specific domain clicks on a certain tab, an event is generated that prevents him from viewing the content of that tab Any advice please???
-
I was thinking of it this way...
private void Form1\_Load(object sender, EventArgs e) { if ((Thread.CurrentPrincipal.IsInRole("admin"))) // admin in this case should be a domain name. { tabPage4.Hide(); } else { MessageBox.Show("You must be a member of the Manager or Administrator's roles to view username and password information", "Insufficient Permissions", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
But now instead of
CurrentPrincipal.IsInRole
put something that will read the domain name. Something of that sort. I'll appreciate any help Thank you