I've created a small project for a fictitious private jet hire company. Here are my relevant project files: https://gist.github.com/anonymous/74d72f7b4c3c37257d16
Within this project, I have a database (under my App_data solution folder) named MyMainDB.mdf. When double clicked, it sends me to the Server Explorer which contains another file called MyMainDBEntities, this contains my tables etc (where the SystemUsers table is held).
I have the register/ log in feature fully implemented and working. I can also display the entire list of users and edit that list remotely from the website when running the solution however, how do I limit access to the AdminIndex view to only a user that is both logged in and logged in as admin@admin.com?
At the moment, once the solution is running, the user is simply allowed to navigate to the following URL: http://localhost:1921/MyTemplate/AdminIndex without any restriction. What do I need to add in terms of code in order to restrict access to the page if you're not logged in as an admin? Would anyone be able to show me an example of how I can do this? Once I know how to do this I can apply this knowledge to other key aspects of my project