Partial Authentication in ASP.NET MVC5
-
Hello, I'm pretty new to ASP.NET.. I'm creating Models using EF, and then creating controllers and views automatically, which is great. What I want to achieve is that, I want unregistered users not to see create new/Delete/update links. Only admins should see those links and do those operations. How can I do that? Thanks.
-
Hello, I'm pretty new to ASP.NET.. I'm creating Models using EF, and then creating controllers and views automatically, which is great. What I want to achieve is that, I want unregistered users not to see create new/Delete/update links. Only admins should see those links and do those operations. How can I do that? Thanks.
What you need is authentication service. To authenticate the users before they can continue to those actions (Create/Delete/Update), and let only Admin users to continue and perform them by visiting those web pages. You would find yourself at ease at this web page: http://www.asp.net/identity[^] ASP.NET Identity is the service by ASP.NET that can be used to authenticate users.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~