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:
@@ -131,15 +131,10 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Device.Actions.AssignUser)]
|
||||
public virtual ActionResult UpdateAssignedUserId(string id, string AssignedUserId = null, string AssignedUserDomain = null, bool redirect = false)
|
||||
public virtual ActionResult UpdateAssignedUserId(string id, string AssignedUserId = null, bool redirect = false)
|
||||
{
|
||||
if (AssignedUserId != null && !AssignedUserId.Contains('\\'))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(AssignedUserDomain))
|
||||
AssignedUserId = string.Format(@"{0}\{1}", ActiveDirectory.Context.PrimaryDomain.NetBiosName, AssignedUserId);
|
||||
else
|
||||
AssignedUserId = string.Format(@"{0}\{1}", AssignedUserDomain, AssignedUserId);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(AssignedUserId))
|
||||
AssignedUserId = ActiveDirectory.ParseDomainAccountId(AssignedUserId);
|
||||
|
||||
return Update(id, pAssignedUserId, AssignedUserId, redirect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user