Search code examples
c#asp.netsecurityrights

Security: Handle Multiple User Rights


Now that my project is almost finished I am trying to implement the login and security. I got a table in my database with all the users in it. Next to the normal login and password columns I also got 7 booleans. Those booleans represent the categories(folders) which the users may access or not.

After the user logins I put the record (user) in my session. So depending on those booleans I will display tabs in my masterpage.

But how do I implent the security measures which redirects the user back to the login when they aren't logged in yet or when they don't got the proper rights to be on that page.

Somebody told me to add some code in de global.asax but I have no experience with it. And got no idea on how to start and it seems like i can't find any examples on the internet


Solution

  • ASP.NET Membership sounds like what you need. No point writing something from scratch when your chosen Framework will already handle it for you, right?

    http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx