Fix: Computer authorized enrolment

Computer Accounts could not enrol
This commit is contained in:
Gary Sharp
2013-10-21 20:02:40 +11:00
parent 5f9a49bca3
commit 4dfe9ad086
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ namespace Disco.BI.DeviceBI
{
if (!authenticatedToken.Has(Claims.Device.Actions.EnrolDevices))
{
if (authenticatedToken.Has(Claims.ComputerAccount))
if (!authenticatedToken.Has(Claims.ComputerAccount))
throw new EnrolSafeException(string.Format("Connection not correctly authenticated (SN: {0}; Auth User: {1})", Request.DeviceSerialNumber, authenticatedToken.User.Id));
if (!authenticatedToken.User.Id.Equals(string.Format("{0}$", Request.DeviceComputerName), System.StringComparison.InvariantCultureIgnoreCase))
throw new EnrolSafeException(string.Format("Connection not correctly authenticated (SN: {0}; Auth User: {1})", Request.DeviceSerialNumber, authenticatedToken.User.Id));