Nearing feature complete for driver auth

This commit is contained in:
2013-01-09 21:33:57 -05:00
parent 0b4c7914b3
commit bc019923d2
49 changed files with 609 additions and 335 deletions
@@ -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
{
}
}
}
+6 -4
View File
@@ -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")