Permissions & Authorization for Users #24

Initial Release; Includes Database and MVC refactoring
This commit is contained in:
Gary Sharp
2013-10-10 19:13:16 +11:00
parent 172ce5524a
commit a099d68915
458 changed files with 40221 additions and 12130 deletions
+14 -15
View File
@@ -1,30 +1,26 @@
@model IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>
@{
var canShowDevices = Authorization.Has(Claims.Device.Show);
}
<div class="genericData deviceTable">
@if (Model != null && Model.Count() > 0)
{
<table class="genericData deviceTable">
<thead>
<tr>
<th>
Serial#
<th>Serial#
</th>
<th>
Asset#
<th>Asset#
</th>
<th>
Name
<th>Name
</th>
<th>
Model
<th>Model
</th>
<th>
Profile
<th>Profile
</th>
<th>
Assigned User
<th>Assigned User
</th>
<th>
Jobs
<th>Jobs
</th>
</tr>
</thead>
@@ -33,7 +29,10 @@
{
<tr class="@(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty)">
<td>
@Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber))
@if (canShowDevices)
{@Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber))}
else
{@item.SerialNumber}
</td>
<td>
@item.AssetNumber