Feature #49: Active Directory Managed Groups

Document Template Attachments, Device Batches, Device Profiles and User
Flags can be associated with an Active Directory group. This AD group is
then automatically synchronized with relevant User/Machine accounts.
Contains various other UI tweaks and configuration enhancements.
This commit is contained in:
Gary Sharp
2014-06-16 22:21:31 +10:00
parent ebf78dd08d
commit a819d2722a
119 changed files with 8349 additions and 2373 deletions
+1 -20
View File
@@ -18,26 +18,7 @@ namespace Disco.Services
public static string FriendlyId(this User u)
{
return FriendlyUserId(u.UserId);
}
public static string FriendlyUserId(string UserId)
{
var splitUserId = SplitUserId(UserId);
if (splitUserId.Item1 != null && splitUserId.Item1.Equals(ActiveDirectory.Context.PrimaryDomain.NetBiosName, StringComparison.OrdinalIgnoreCase))
return splitUserId.Item2;
else
return UserId;
}
public static Tuple<string, string> SplitUserId(string UserId)
{
var slashIndex = UserId.IndexOf('\\');
if (slashIndex < 0)
return Tuple.Create<string, string>(null, UserId);
else
return Tuple.Create(UserId.Substring(0, slashIndex), UserId.Substring(slashIndex + 1));
return ActiveDirectory.FriendlyAccountId(u.UserId);
}
}
}