User access and options validation
-
Hello everyone, so we have an ASP Net project witch need to show/hide/disable/enable some controls in the page and allow/deny access according to the credentials of the user logged (role based). Right now all this process is due manually, every control has its own logic, the same for every page. I do not want my homework due by yours, just some guidelines on how to accomplish this task in the most easy and clean way. p.s: Sorry for my bad english.
-
Hello everyone, so we have an ASP Net project witch need to show/hide/disable/enable some controls in the page and allow/deny access according to the credentials of the user logged (role based). Right now all this process is due manually, every control has its own logic, the same for every page. I do not want my homework due by yours, just some guidelines on how to accomplish this task in the most easy and clean way. p.s: Sorry for my bad english.
You haven't specified how you are managing user details in your application. The Membership and Role APIs in ASP.NET 2.0 help you with controlling access to functionality. For instance, limiting access to pages based on a user's role can be defined declaratively in the web.config. To configure layout based on user role, you could consider using the MultiView and View controls and defining different page layout views for different types of users.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
You haven't specified how you are managing user details in your application. The Membership and Role APIs in ASP.NET 2.0 help you with controlling access to functionality. For instance, limiting access to pages based on a user's role can be defined declaratively in the web.config. To configure layout based on user role, you could consider using the MultiView and View controls and defining different page layout views for different types of users.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
Thanks for you response. I did not start this project, i am being assigned to solve this problem. All the security is Session based, something like that :
If Session("User") Is Nothing Then Response.Redirect("Login.aspx") End If
Ugly isn't?? By the way, all those settings (groups, users, permissions, allowed actions, allowed pages) come from a database, so the web.config is not an option. I will check your recommendations and see if those changes are doable without much headache. Cheers. -
Hello everyone, so we have an ASP Net project witch need to show/hide/disable/enable some controls in the page and allow/deny access according to the credentials of the user logged (role based). Right now all this process is due manually, every control has its own logic, the same for every page. I do not want my homework due by yours, just some guidelines on how to accomplish this task in the most easy and clean way. p.s: Sorry for my bad english.
-
hello emiaj well u can always use panel control. and grouping your control based on user's role. with this, you just customize one panel control instead many controls. i hope this will help your "homework" :) . best, boku