Nearing feature complete for driver auth
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
@model MileageTraker.Web.ViewModels.CheckBoxViewModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
ViewData.ModelMetadata.DisplayName = "Roles";
|
||||
}
|
||||
@Html.CheckBoxListFor(
|
||||
m => m.Selected,
|
||||
m => m.Available,
|
||||
m => m,
|
||||
m => m,
|
||||
m => m.Selected)
|
||||
@@ -11,9 +11,5 @@
|
||||
{
|
||||
@Html.Editor(prop.PropertyName)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,14 +23,16 @@
|
||||
<span class="brand"></span>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
@if (Roles.IsUserInRole(User.Identity.Name, "Administrator")
|
||||
|| Roles.IsUserInRole(User.Identity.Name, "Developer"))
|
||||
@if (User.IsInRole("Driver") || User.IsInRole("Developer") || User.IsInRole("Administrator"))
|
||||
{
|
||||
<li>@Html.ActionLink("Enter Log", "Index", "CreateLog")</li>
|
||||
}
|
||||
@if (User.IsInRole("Developer") || User.IsInRole("Administrator"))
|
||||
{
|
||||
<li id="log-nav">@Html.ActionLink("Logs", "Index", "Log")</li>
|
||||
<li id="vehicle-nav">@Html.ActionLink("Vehicles", "Index", "Vehicle")</li>
|
||||
<li id="user-nav">@Html.ActionLink("Users", "Index", "User")</li>
|
||||
}
|
||||
<li>@Html.ActionLink("Enter Log", "Index", "CreateLog")</li>
|
||||
}
|
||||
</ul>
|
||||
<section id="account-management">
|
||||
@Html.Partial("_NavAccountInfo")
|
||||
|
||||
Reference in New Issue
Block a user