ASP.NET MVC with Entity Framework and CSS by Lee Naylor

ASP.NET MVC with Entity Framework and CSS by Lee Naylor

Author:Lee Naylor
Language: eng
Format: epub, pdf
Publisher: Apress, Berkeley, CA


Adding Authorization for Product and Category Administration

We are now going to use the Admin role to manage the availability of the links and for admin features such as creating, deleting, and updating categories and products.

Adding Authorization to Categories

To add authorization to show or hide links for creating, editing, and deleting categories, modify the Views\Categories\Index.cshtml file as highlighted in bold:

@model IEnumerable<BabyStore.Models.Category>

@{

ViewBag.Title = "Categories";

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.