Bug Fix #36: Default Profile name template error

The "Initial Default Workstation Profile" had an incorrect Computer Name
Template set by default. This does not affect newly created Device
Profiles which use a valid template.
This commit is contained in:
Gary Sharp
2014-01-23 13:36:19 +11:00
parent 2ddf4b7bd9
commit 10394c4e39
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ namespace Disco.Data.Repository
ShortName = "WS", ShortName = "WS",
Name = "Default", Name = "Default",
Description = "Initial Default Workstation Profile", Description = "Initial Default Workstation Profile",
ComputerNameTemplate = "DeviceProfile.ShortName + ''-'' + SerialNumber", ComputerNameTemplate = DeviceProfile.DefaultComputerNameTemplate,
DistributionType = DeviceProfile.DistributionTypes.OneToMany DistributionType = DeviceProfile.DistributionTypes.OneToMany
}); });
} }
@@ -63,6 +63,8 @@ namespace Disco.Models.Repository
[StringLength(64)] [StringLength(64)]
public string CertificateProviderId { get; set; } public string CertificateProviderId { get; set; }
public const string DefaultComputerNameTemplate = "DeviceProfile.ShortName + '-' + SerialNumber";
public enum DistributionTypes : int public enum DistributionTypes : int
{ {
OneToMany = 0, OneToMany = 0,
@@ -73,7 +73,7 @@ namespace Disco.Web.Areas.Config.Controllers
{ {
DeviceProfile = new DeviceProfile() DeviceProfile = new DeviceProfile()
{ {
ComputerNameTemplate = "DeviceProfile.ShortName + '-' + SerialNumber", ComputerNameTemplate = DeviceProfile.DefaultComputerNameTemplate,
ProvisionADAccount = true, ProvisionADAccount = true,
DistributionType = DeviceProfile.DistributionTypes.OneToMany DistributionType = DeviceProfile.DistributionTypes.OneToMany
} }