Update: New Device UI

This commit is contained in:
Gary Sharp
2013-06-18 17:18:19 +10:00
parent d6be58b5c7
commit b7dc05dd65
63 changed files with 5068 additions and 2626 deletions
@@ -10,10 +10,38 @@ namespace Disco.BI.Extensions
{
public static class DeviceActionExtensions
{
public static bool IsDecommissioned(this Device d)
{
return d.DecommissionedDate.HasValue;
}
public static bool CanCreateJob(this Device d)
{
return !d.DecommissionedDate.HasValue;
return !d.IsDecommissioned();
}
public static bool CanUpdateAssignment(this Device d)
{
return !d.IsDecommissioned();
}
public static bool CanUpdateDeviceProfile(this Device d)
{
return !d.IsDecommissioned();
}
public static bool CanUpdateDeviceBatch(this Device d)
{
return !d.IsDecommissioned();
}
public static bool CanUpdateTrustEnrol(this Device d)
{
return !d.IsDecommissioned() && !d.AllowUnauthenticatedEnrol;
}
public static bool CanUpdateUntrustEnrol(this Device d)
{
return !d.IsDecommissioned() && d.AllowUnauthenticatedEnrol;
}
#region Decommission