@model Disco.Web.Models.Device.ShowModel @{ Authorization.Require(Claims.Device.ShowCertificates); var hasDownloadCert = Authorization.Has(Claims.Config.DeviceCertificate.DownloadCertificates); }
@if (Model.Certificates.Count() > 0) { @foreach (var item in Model.Certificates) { }
Name Enabled Allocated Expires
@if (hasDownloadCert) { @item.Name } else { @item.Name } @item.Enabled @CommonHelpers.FriendlyDate(item.AllocatedDate) @CommonHelpers.FriendlyDate(item.ExpirationDate)
if (hasDownloadCert) { using (Html.BeginForm(MVC.API.DeviceCertificate.Download())) { @Html.AntiForgeryToken() } } } else { No Certificates Allocated }