I need to do a user restriction on an ASP.NET C # application.
In this application, separated by several classifications, I have a table with all form items, with bit fields, so that the restrictions are saved.
But if a user who does not have access to the AccountsPayments form, they will not click, but if they copy or type the url eg: www.teste.com.br/ContasPagar, it will open the page.
I thought about the time of the login, save the user a session, and whether it is student or employee type, and on each page load the check with the database table.
I would like to know if this is the best way, and if there is some other way more practical and fast, and if there will be no problems, as I will save in the session id_user the id of the user, and in the type, if he is a student or confused with multiple users accessing at the same time.