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:
@@ -1,6 +1,7 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
@@ -36,6 +37,13 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
DeviceDecommissionedCount = dG.Count(d => d.DecommissionedDate.HasValue)
|
||||
}).ToArray().Cast<ConfigDeviceBatchShowModelMembership>().ToList();
|
||||
|
||||
DeviceBatchAssignedUsersManagedGroup assignedUsersManagedGroup;
|
||||
if (DeviceBatchAssignedUsersManagedGroup.TryGetManagedGroup(m.DeviceBatch, out assignedUsersManagedGroup))
|
||||
m.AssignedUsersLinkedGroup = assignedUsersManagedGroup;
|
||||
DeviceBatchDevicesManagedGroup devicesManagedGroup;
|
||||
if (DeviceBatchDevicesManagedGroup.TryGetManagedGroup(m.DeviceBatch, out devicesManagedGroup))
|
||||
m.DevicesLinkedGroup = devicesManagedGroup;
|
||||
|
||||
if (Authorization.Has(Claims.Config.DeviceBatch.Delete))
|
||||
m.CanDelete = m.DeviceBatch.CanDelete(Database);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user