Add date-based managed group filtering
This commit is contained in:
@@ -21,7 +21,6 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
private IDisposable repositoryAddSubscription;
|
||||
private IDisposable repositoryRemoveSubscription;
|
||||
private IDisposable deviceRenameRepositorySubscription;
|
||||
private IDisposable jobCloseRepositorySubscription;
|
||||
private IDisposable deviceAssignmentRepositorySubscription;
|
||||
private string DocumentTemplateId;
|
||||
private string DocumentTemplateDescription;
|
||||
@@ -62,9 +61,6 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
repositoryRemoveSubscription = DocumentTemplateManagedGroups.JobAttachmentRemoveEvents.Value
|
||||
.Where(e => e.Item3 == DocumentTemplateId)
|
||||
.Subscribe(ProcessJobAttachmentRemoveEvent);
|
||||
// Observe Job Close/Reopen
|
||||
jobCloseRepositorySubscription = DocumentTemplateManagedGroups.JobCloseRepositoryEvents.Value
|
||||
.Subscribe(ProcessJobCloseRepositoryEvent);
|
||||
break;
|
||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||
// Observe User Attachments
|
||||
@@ -161,27 +157,64 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
switch (DocumentTemplateScope)
|
||||
{
|
||||
case DocumentTemplate.DocumentTemplateScopes.Device:
|
||||
return Database.Devices
|
||||
.Where(d => d.DeviceDomainId != null && d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(d => d.DeviceDomainId)
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.Devices
|
||||
.Where(d => d.DeviceDomainId != null && d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Select(d => d.DeviceDomainId)
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.Devices
|
||||
.Where(d => d.DeviceDomainId != null && d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(d => d.DeviceDomainId)
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
}
|
||||
case DocumentTemplate.DocumentTemplateScopes.Job:
|
||||
return Database.Jobs
|
||||
.Where(j => !j.ClosedDate.HasValue && j.Device.DeviceDomainId != null && j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(j => j.Device.DeviceDomainId)
|
||||
.Distinct()
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.Jobs
|
||||
.Where(j => j.Device.DeviceDomainId != null && j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Select(j => j.Device.DeviceDomainId)
|
||||
.Distinct()
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.Jobs
|
||||
.Where(j => j.Device.DeviceDomainId != null && j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(j => j.Device.DeviceDomainId)
|
||||
.Distinct()
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
}
|
||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||
return Database.Users
|
||||
.Where(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.SelectMany(u => u.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue && dua.Device.DeviceDomainId != null), (u, dua) => dua.Device.DeviceDomainId)
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.Users
|
||||
.Where(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))
|
||||
.SelectMany(u => u.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue && dua.Device.DeviceDomainId != null), (u, dua) => dua.Device.DeviceDomainId)
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.Users
|
||||
.Where(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.SelectMany(u => u.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue && dua.Device.DeviceDomainId != null), (u, dua) => dua.Device.DeviceDomainId)
|
||||
.ToList()
|
||||
.Where(ActiveDirectory.IsValidDomainAccountId)
|
||||
.Select(id => id + "$");
|
||||
}
|
||||
default:
|
||||
return Enumerable.Empty<string>();
|
||||
}
|
||||
@@ -190,10 +223,22 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
#region Device Scope
|
||||
private bool DeviceContainsAttachment(DiscoDataContext Database, string DeviceSerialNumber, out string DeviceAccountId)
|
||||
{
|
||||
var result = Database.Devices
|
||||
.Where(d => d.SerialNumber == DeviceSerialNumber && d.DeviceDomainId != null)
|
||||
.Select(d => new Tuple<string, bool>(d.DeviceDomainId, d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId)))
|
||||
.FirstOrDefault();
|
||||
Tuple<string, bool> result;
|
||||
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
result = Database.Devices
|
||||
.Where(d => d.SerialNumber == DeviceSerialNumber && d.DeviceDomainId != null)
|
||||
.Select(d => Tuple.Create(d.DeviceDomainId, d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate)))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
result = Database.Devices
|
||||
.Where(d => d.SerialNumber == DeviceSerialNumber && d.DeviceDomainId != null)
|
||||
.Select(d => Tuple.Create(d.DeviceDomainId, d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId)))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -241,13 +286,29 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
#region Job Scope
|
||||
private bool JobsContainAttachment(DiscoDataContext Database, int JobId, out string DeviceAccountId, out string DeviceSerialNumber)
|
||||
{
|
||||
var result = Database.Jobs
|
||||
.Where(j => j.Id == JobId && j.Device.DeviceDomainId != null)
|
||||
.Select(j => new Tuple<string, string, bool>(
|
||||
j.Device.DeviceDomainId,
|
||||
j.Device.SerialNumber,
|
||||
j.Device.Jobs.Where(dj => !dj.ClosedDate.HasValue).Any(dj => dj.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId)))
|
||||
).FirstOrDefault();
|
||||
Tuple<string, string, bool> result;
|
||||
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
result = Database.Jobs
|
||||
.Where(j => j.Id == JobId && j.Device.DeviceDomainId != null)
|
||||
.Select(j => new Tuple<string, string, bool>(
|
||||
j.Device.DeviceDomainId,
|
||||
j.Device.SerialNumber,
|
||||
j.Device.Jobs.Any(dj => dj.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
result = Database.Jobs
|
||||
.Where(j => j.Id == JobId && j.Device.DeviceDomainId != null)
|
||||
.Select(j => new Tuple<string, string, bool>(
|
||||
j.Device.DeviceDomainId,
|
||||
j.Device.SerialNumber,
|
||||
j.Device.Jobs.Any(dj => dj.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -304,14 +365,30 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
#region User Scope
|
||||
private bool DeviceUserContainAttachment(DiscoDataContext Database, string UserId, out List<Tuple<string, string>> Devices)
|
||||
{
|
||||
var result = Database.Users
|
||||
.Where(u => u.UserId == UserId)
|
||||
.Select(u => new Tuple<bool, IEnumerable<Tuple<string, string>>>(
|
||||
u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId),
|
||||
u.DeviceUserAssignments
|
||||
.Where(dua => !dua.UnassignedDate.HasValue && dua.Device.DeviceDomainId != null)
|
||||
.Select(dua => new Tuple<string, string>(dua.Device.DeviceDomainId, dua.Device.SerialNumber)))
|
||||
).FirstOrDefault();
|
||||
Tuple<bool, IEnumerable<Tuple<string, string>>> result;
|
||||
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
result = Database.Users
|
||||
.Where(u => u.UserId == UserId)
|
||||
.Select(u => Tuple.Create(
|
||||
u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate),
|
||||
u.DeviceUserAssignments
|
||||
.Where(dua => !dua.UnassignedDate.HasValue && dua.Device.DeviceDomainId != null)
|
||||
.Select(dua => new Tuple<string, string>(dua.Device.DeviceDomainId, dua.Device.SerialNumber))))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
result = Database.Users
|
||||
.Where(u => u.UserId == UserId)
|
||||
.Select(u => Tuple.Create(
|
||||
u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId),
|
||||
u.DeviceUserAssignments
|
||||
.Where(dua => !dua.UnassignedDate.HasValue && dua.Device.DeviceDomainId != null)
|
||||
.Select(dua => new Tuple<string, string>(dua.Device.DeviceDomainId, dua.Device.SerialNumber))))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -376,9 +453,19 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
}
|
||||
break;
|
||||
case DocumentTemplate.DocumentTemplateScopes.Job:
|
||||
var jobsHaveTemplate = e.Database.Jobs
|
||||
.Where(j => !j.ClosedDate.HasValue && j.DeviceSerialNumber == deviceSerialNumber)
|
||||
.Any(j => j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId));
|
||||
bool jobsHaveTemplate;
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
jobsHaveTemplate = e.Database.Jobs
|
||||
.Where(j => j.DeviceSerialNumber == deviceSerialNumber)
|
||||
.Any(j => j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate));
|
||||
}
|
||||
else
|
||||
{
|
||||
jobsHaveTemplate = e.Database.Jobs
|
||||
.Where(j => j.DeviceSerialNumber == deviceSerialNumber)
|
||||
.Any(j => j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId));
|
||||
}
|
||||
|
||||
if (jobsHaveTemplate)
|
||||
{
|
||||
@@ -389,10 +476,21 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
}
|
||||
break;
|
||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||
var userHasTemplate = e.Database.Devices
|
||||
.Where(d => d.SerialNumber == deviceSerialNumber)
|
||||
.Select(d => d.AssignedUser)
|
||||
.Any(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId));
|
||||
bool userHasTemplate;
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
userHasTemplate = e.Database.Devices
|
||||
.Where(d => d.SerialNumber == deviceSerialNumber)
|
||||
.Select(d => d.AssignedUser)
|
||||
.Any(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate));
|
||||
}
|
||||
else
|
||||
{
|
||||
userHasTemplate = e.Database.Devices
|
||||
.Where(d => d.SerialNumber == deviceSerialNumber)
|
||||
.Select(d => d.AssignedUser)
|
||||
.Any(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId));
|
||||
}
|
||||
|
||||
if (userHasTemplate)
|
||||
{
|
||||
@@ -407,30 +505,6 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessJobCloseRepositoryEvent(RepositoryMonitorEvent e)
|
||||
{
|
||||
var job = (Job)e.Entity;
|
||||
|
||||
if (job.DeviceSerialNumber != null)
|
||||
{
|
||||
var jobId = job.Id;
|
||||
|
||||
var relevantJob = e.Database.Jobs
|
||||
.Where(j => j.Id == jobId && j.JobAttachments.Any(ja => ja.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
|
||||
if (relevantJob)
|
||||
{
|
||||
string deviceAccountId;
|
||||
string deviceSerialNumber;
|
||||
if (JobsContainAttachment(e.Database, jobId, out deviceAccountId, out deviceSerialNumber))
|
||||
AddMember(deviceSerialNumber, (database) => new string[] { deviceAccountId });
|
||||
else
|
||||
RemoveMember(deviceSerialNumber, (database) => new string[] { deviceAccountId });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessDeviceAssignmentRepositoryEvent(RepositoryMonitorEvent Event)
|
||||
{
|
||||
var device = (Device)Event.Entity;
|
||||
@@ -448,14 +522,36 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
bool currentUserHasTemplate = false;
|
||||
|
||||
if (devicePreviousAssignedUserId != null)
|
||||
previousUserHasTemplate = e.Database.Users
|
||||
.Where(u => u.UserId == devicePreviousAssignedUserId && u.UserAttachments.Any(ua => ua.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
{
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
previousUserHasTemplate = e.Database.Users
|
||||
.Where(u => u.UserId == devicePreviousAssignedUserId && u.UserAttachments.Any(ua => ua.DocumentTemplateId == this.DocumentTemplateId && ua.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Any();
|
||||
}
|
||||
else
|
||||
{
|
||||
previousUserHasTemplate = e.Database.Users
|
||||
.Where(u => u.UserId == devicePreviousAssignedUserId && u.UserAttachments.Any(ua => ua.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
}
|
||||
}
|
||||
|
||||
if (deviceCurrentAssignedUserId != null)
|
||||
currentUserHasTemplate = e.Database.Users
|
||||
.Where(u => u.UserId == deviceCurrentAssignedUserId && u.UserAttachments.Any(ua => ua.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
{
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
currentUserHasTemplate = e.Database.Users
|
||||
.Where(u => u.UserId == deviceCurrentAssignedUserId && u.UserAttachments.Any(ua => ua.DocumentTemplateId == this.DocumentTemplateId && ua.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Any();
|
||||
}
|
||||
else
|
||||
{
|
||||
currentUserHasTemplate = e.Database.Users
|
||||
.Where(u => u.UserId == deviceCurrentAssignedUserId && u.UserAttachments.Any(ua => ua.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
}
|
||||
}
|
||||
|
||||
if (!previousUserHasTemplate && currentUserHasTemplate)
|
||||
AddMember(deviceSerialNumber, (database) => new string[] { deviceAccountId + "$" });
|
||||
@@ -476,9 +572,6 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
if (deviceRenameRepositorySubscription != null)
|
||||
deviceRenameRepositorySubscription.Dispose();
|
||||
|
||||
if (jobCloseRepositorySubscription != null)
|
||||
jobCloseRepositorySubscription.Dispose();
|
||||
|
||||
if (deviceAssignmentRepositorySubscription != null)
|
||||
deviceAssignmentRepositorySubscription.Dispose();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
|
||||
private IDisposable repositoryAddSubscription;
|
||||
private IDisposable repositoryRemoveSubscription;
|
||||
private IDisposable jobCloseRepositorySubscription;
|
||||
private IDisposable deviceAssignmentRepositorySubscription;
|
||||
private string DocumentTemplateId;
|
||||
private string DocumentTemplateDescription;
|
||||
@@ -64,9 +63,6 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
repositoryRemoveSubscription = DocumentTemplateManagedGroups.JobAttachmentRemoveEvents.Value
|
||||
.Where(e => e.Item3 == DocumentTemplateId)
|
||||
.Subscribe(ProcessJobAttachmentRemoveEvent);
|
||||
// Observe Job Close/Reopen
|
||||
jobCloseRepositorySubscription = DocumentTemplateManagedGroups.JobCloseRepositoryEvents.Value
|
||||
.Subscribe(ProcessJobCloseRepositoryEvent);
|
||||
break;
|
||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||
// Observe User Attachments
|
||||
@@ -156,18 +152,46 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
switch (DocumentTemplateScope)
|
||||
{
|
||||
case DocumentTemplate.DocumentTemplateScopes.Device:
|
||||
return Database.Devices
|
||||
.Where(d => d.AssignedUserId != null && d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(d => d.AssignedUserId);
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.Devices
|
||||
.Where(d => d.AssignedUserId != null && d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Select(d => d.AssignedUserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.Devices
|
||||
.Where(d => d.AssignedUserId != null && d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(d => d.AssignedUserId);
|
||||
}
|
||||
case DocumentTemplate.DocumentTemplateScopes.Job:
|
||||
return Database.Jobs
|
||||
.Where(j => !j.ClosedDate.HasValue && j.UserId != null && j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(j => j.UserId)
|
||||
.Distinct();
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.Jobs
|
||||
.Where(j => j.UserId != null && j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Select(j => j.UserId)
|
||||
.Distinct();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.Jobs
|
||||
.Where(j => j.UserId != null && j.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(j => j.UserId)
|
||||
.Distinct();
|
||||
}
|
||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||
return Database.Users
|
||||
.Where(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(u => u.UserId);
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.Users
|
||||
.Where(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Select(u => u.UserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.Users
|
||||
.Where(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Select(u => u.UserId);
|
||||
}
|
||||
default:
|
||||
return Enumerable.Empty<string>();
|
||||
}
|
||||
@@ -176,10 +200,26 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
#region Device Scope
|
||||
private bool DeviceContainsAttachment(DiscoDataContext Database, string DeviceSerialNumber, out string UserId)
|
||||
{
|
||||
var result = Database.Devices
|
||||
.Where(d => d.SerialNumber == DeviceSerialNumber && d.AssignedUser != null)
|
||||
.Select(d => new Tuple<string, bool>(d.AssignedUserId, d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId)))
|
||||
.FirstOrDefault();
|
||||
Tuple<string, bool> result;
|
||||
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
result = Database.Devices
|
||||
.Where(d => d.SerialNumber == DeviceSerialNumber && d.AssignedUser != null)
|
||||
.Select(d => Tuple.Create(
|
||||
d.AssignedUserId,
|
||||
d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate)))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
result = Database.Devices
|
||||
.Where(d => d.SerialNumber == DeviceSerialNumber && d.AssignedUser != null)
|
||||
.Select(d => Tuple.Create(
|
||||
d.AssignedUserId,
|
||||
d.DeviceAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId)))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -222,12 +262,26 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
#region Job Scope
|
||||
private bool JobsContainAttachment(DiscoDataContext Database, int JobId, out string UserId)
|
||||
{
|
||||
var result = Database.Jobs
|
||||
.Where(j => j.Id == JobId && j.UserId != null)
|
||||
.Select(j => new Tuple<string, bool>(
|
||||
j.UserId,
|
||||
j.User.Jobs.Where(uj => !uj.ClosedDate.HasValue).Any(uj => uj.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId)))
|
||||
).FirstOrDefault();
|
||||
Tuple<string, bool> result;
|
||||
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
result = Database.Jobs
|
||||
.Where(j => j.Id == JobId && j.UserId != null)
|
||||
.Select(j => Tuple.Create(
|
||||
j.UserId,
|
||||
j.User.Jobs.Any(uj => uj.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate))))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
result = Database.Jobs
|
||||
.Where(j => j.Id == JobId && j.UserId != null)
|
||||
.Select(j => Tuple.Create(
|
||||
j.UserId,
|
||||
j.User.Jobs.Any(uj => uj.JobAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId))))
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -270,11 +324,18 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
#region User Scope
|
||||
private bool UserContainAttachment(DiscoDataContext Database, string UserId)
|
||||
{
|
||||
var result = Database.Users
|
||||
.Where(u => u.UserId == UserId)
|
||||
.Any(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId));
|
||||
|
||||
return result;
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.Users
|
||||
.Where(u => u.UserId == UserId)
|
||||
.Any(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId && a.Timestamp >= Configuration.FilterBeginDate));
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.Users
|
||||
.Where(u => u.UserId == UserId)
|
||||
.Any(u => u.UserAttachments.Any(a => a.DocumentTemplateId == this.DocumentTemplateId));
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessUserAttachmentAddEvent(RepositoryMonitorEvent e)
|
||||
@@ -299,37 +360,24 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void ProcessJobCloseRepositoryEvent(RepositoryMonitorEvent e)
|
||||
{
|
||||
var job = (Job)e.Entity;
|
||||
|
||||
if (job.UserId != null)
|
||||
{
|
||||
var jobId = job.Id;
|
||||
|
||||
var relevantJob = e.Database.Jobs
|
||||
.Where(j => j.Id == jobId && j.JobAttachments.Any(ja => ja.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
|
||||
if (relevantJob)
|
||||
{
|
||||
string userId;
|
||||
if (JobsContainAttachment(e.Database, jobId, out userId))
|
||||
AddMember(userId, (database) => new string[] { userId });
|
||||
else
|
||||
RemoveMember(userId, (database) => new string[] { userId });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessDeviceAssignmentRepositoryEvent(RepositoryMonitorEvent Event)
|
||||
{
|
||||
var device = (Device)Event.Entity;
|
||||
var deviceSerialNumber = device.SerialNumber;
|
||||
bool relevantDevice;
|
||||
|
||||
var relevantDevice = Event.Database.Devices
|
||||
.Where(d => d.SerialNumber == deviceSerialNumber && d.DeviceAttachments.Any(ja => ja.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
relevantDevice = Event.Database.Devices
|
||||
.Where(d => d.SerialNumber == deviceSerialNumber && d.DeviceAttachments.Any(ja => ja.DocumentTemplateId == this.DocumentTemplateId && ja.Timestamp >= Configuration.FilterBeginDate))
|
||||
.Any();
|
||||
}
|
||||
else
|
||||
{
|
||||
relevantDevice = Event.Database.Devices
|
||||
.Where(d => d.SerialNumber == deviceSerialNumber && d.DeviceAttachments.Any(ja => ja.DocumentTemplateId == this.DocumentTemplateId))
|
||||
.Any();
|
||||
}
|
||||
|
||||
if (relevantDevice)
|
||||
{
|
||||
@@ -355,9 +403,6 @@ namespace Disco.Services.Documents.ManagedGroups
|
||||
if (repositoryRemoveSubscription != null)
|
||||
repositoryRemoveSubscription.Dispose();
|
||||
|
||||
if (jobCloseRepositorySubscription != null)
|
||||
jobCloseRepositorySubscription.Dispose();
|
||||
|
||||
if (deviceAssignmentRepositorySubscription != null)
|
||||
deviceAssignmentRepositorySubscription.Dispose();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Disco.Services.Users.UserFlags
|
||||
public override string Description { get { return string.Format(DescriptionFormat, UserFlagName); } }
|
||||
public override string CategoryDescription { get { return CategoryDescriptionFormat; } }
|
||||
public override string GroupDescription { get { return string.Format(GroupDescriptionFormat, UserFlagName); } }
|
||||
public override bool IncludeFilterBeginDate { get { return false; } }
|
||||
public override bool IncludeFilterBeginDate { get { return true; } }
|
||||
|
||||
private UserFlagUserDevicesManagedGroup(string Key, ADManagedGroupConfiguration Configuration, UserFlag UserFlag)
|
||||
: base(Key, Configuration)
|
||||
@@ -105,7 +105,27 @@ namespace Disco.Services.Users.UserFlags
|
||||
|
||||
private IEnumerable<string> DetermineDeviceMembers(DiscoDataContext Database, string UserId)
|
||||
{
|
||||
return DetermineDeviceMembers(Database.Users.Where(u => u.UserId == UserId));
|
||||
IQueryable<User> assignments;
|
||||
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
assignments = Database.Users
|
||||
.Where(u => u.UserId == UserId &&
|
||||
u.UserFlagAssignments
|
||||
.Any(a => a.UserFlagId == UserFlagId &&
|
||||
!a.RemovedDate.HasValue &&
|
||||
a.AddedDate >= Configuration.FilterBeginDate));
|
||||
}
|
||||
else
|
||||
{
|
||||
assignments = Database.Users
|
||||
.Where(u => u.UserId == UserId &&
|
||||
u.UserFlagAssignments
|
||||
.Any(a => a.UserFlagId == UserFlagId &&
|
||||
!a.RemovedDate.HasValue));
|
||||
}
|
||||
|
||||
return DetermineDeviceMembers(assignments);
|
||||
}
|
||||
|
||||
private IEnumerable<string> DetermineDeviceMembers(IQueryable<User> Users)
|
||||
@@ -121,38 +141,85 @@ namespace Disco.Services.Users.UserFlags
|
||||
|
||||
public override IEnumerable<string> DetermineMembers(DiscoDataContext Database)
|
||||
{
|
||||
var assignments = Database.UserFlagAssignments
|
||||
.Where(a => a.UserFlagId == UserFlagId && !a.RemovedDate.HasValue)
|
||||
.Select(a => a.User);
|
||||
IQueryable<User> assignments;
|
||||
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
assignments = Database.UserFlagAssignments
|
||||
.Where(a => a.UserFlagId == UserFlagId &&
|
||||
!a.RemovedDate.HasValue &&
|
||||
a.AddedDate >= Configuration.FilterBeginDate)
|
||||
.Select(a => a.User);
|
||||
}
|
||||
else
|
||||
{
|
||||
assignments = Database.UserFlagAssignments
|
||||
.Where(a => a.UserFlagId == UserFlagId &&
|
||||
!a.RemovedDate.HasValue)
|
||||
.Select(a => a.User);
|
||||
}
|
||||
|
||||
return DetermineDeviceMembers(assignments);
|
||||
}
|
||||
|
||||
private void ProcessRepositoryEvent(RepositoryMonitorEvent Event)
|
||||
{
|
||||
var userFlagAssignemnt = (UserFlagAssignment)Event.Entity;
|
||||
string userId = userFlagAssignemnt.UserId;
|
||||
var userFlagAssignment = (UserFlagAssignment)Event.Entity;
|
||||
string userId = userFlagAssignment.UserId;
|
||||
|
||||
switch (Event.EventType)
|
||||
{
|
||||
case RepositoryMonitorEventType.Added:
|
||||
if (!userFlagAssignemnt.RemovedDate.HasValue)
|
||||
AddMember(userFlagAssignemnt.UserId, (database) => DetermineDeviceMembers(database, userId));
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
if (!userFlagAssignment.RemovedDate.HasValue && userFlagAssignment.AddedDate >= Configuration.FilterBeginDate)
|
||||
{
|
||||
AddMember(userFlagAssignment.UserId, (database) => DetermineDeviceMembers(database, userId));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!userFlagAssignment.RemovedDate.HasValue)
|
||||
{
|
||||
AddMember(userFlagAssignment.UserId, (database) => DetermineDeviceMembers(database, userId));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RepositoryMonitorEventType.Modified:
|
||||
if (userFlagAssignemnt.RemovedDate.HasValue)
|
||||
RemoveMember(userFlagAssignemnt.UserId, (database) => DetermineDeviceMembers(database, userId));
|
||||
else
|
||||
AddMember(userFlagAssignemnt.UserId, (database) => DetermineDeviceMembers(database, userId));
|
||||
if (!Configuration.FilterBeginDate.HasValue || userFlagAssignment.AddedDate >= Configuration.FilterBeginDate)
|
||||
{
|
||||
if (userFlagAssignment.RemovedDate.HasValue)
|
||||
RemoveMember(userFlagAssignment.UserId, (database) => DetermineDeviceMembers(database, userId));
|
||||
else
|
||||
AddMember(userFlagAssignment.UserId, (database) => DetermineDeviceMembers(database, userId));
|
||||
}
|
||||
break;
|
||||
case RepositoryMonitorEventType.Deleted:
|
||||
// Remove the user's devices if no other (non-removed) assignments exist.
|
||||
RemoveMember(userId, (database) =>
|
||||
{
|
||||
if (database.UserFlagAssignments.Any(a => a.UserFlagId == UserFlagId && a.UserId == userId && !a.RemovedDate.HasValue))
|
||||
return null;
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
if (database.UserFlagAssignments.Any(a => a.UserFlagId == UserFlagId && a.UserId == userId && !a.RemovedDate.HasValue && a.AddedDate >= Configuration.FilterBeginDate))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return DetermineDeviceMembers(database, userId);
|
||||
}
|
||||
}
|
||||
else
|
||||
return DetermineDeviceMembers(database, userId);
|
||||
{
|
||||
if (database.UserFlagAssignments.Any(a => a.UserFlagId == UserFlagId && a.UserId == userId && !a.RemovedDate.HasValue))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return DetermineDeviceMembers(database, userId);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Disco.Services.Users.UserFlags
|
||||
private const string DescriptionFormat = "User associated with the {0} Flag will be added to this Active Directory group.";
|
||||
private const string CategoryDescriptionFormat = "Assigned Users Linked Group";
|
||||
private const string GroupDescriptionFormat = "{0} [User Flag Users]";
|
||||
|
||||
|
||||
private IDisposable repositorySubscription;
|
||||
private int UserFlagId;
|
||||
private string UserFlagName;
|
||||
@@ -24,7 +24,7 @@ namespace Disco.Services.Users.UserFlags
|
||||
public override string Description { get { return string.Format(DescriptionFormat, UserFlagName); } }
|
||||
public override string CategoryDescription { get { return CategoryDescriptionFormat; } }
|
||||
public override string GroupDescription { get { return string.Format(GroupDescriptionFormat, UserFlagName); } }
|
||||
public override bool IncludeFilterBeginDate { get { return false; } }
|
||||
public override bool IncludeFilterBeginDate { get { return true; } }
|
||||
|
||||
private UserFlagUsersManagedGroup(string Key, ADManagedGroupConfiguration Configuration, UserFlag UserFlag)
|
||||
: base(Key, Configuration)
|
||||
@@ -105,36 +105,96 @@ namespace Disco.Services.Users.UserFlags
|
||||
|
||||
public override IEnumerable<string> DetermineMembers(DiscoDataContext Database)
|
||||
{
|
||||
return Database.UserFlagAssignments
|
||||
.Where(a => a.UserFlagId == UserFlagId && !a.RemovedDate.HasValue)
|
||||
.Select(a => a.UserId);
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
return Database.UserFlagAssignments
|
||||
.Where(a => a.UserFlagId == UserFlagId && !a.RemovedDate.HasValue && a.AddedDate >= Configuration.FilterBeginDate)
|
||||
.Select(a => a.UserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Database.UserFlagAssignments
|
||||
.Where(a => a.UserFlagId == UserFlagId && !a.RemovedDate.HasValue)
|
||||
.Select(a => a.UserId);
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessRepositoryEvent(RepositoryMonitorEvent Event)
|
||||
{
|
||||
var userFlagAssignemnt = (UserFlagAssignment)Event.Entity;
|
||||
var userFlagAssignment = (UserFlagAssignment)Event.Entity;
|
||||
|
||||
switch (Event.EventType)
|
||||
{
|
||||
case RepositoryMonitorEventType.Added:
|
||||
if (!userFlagAssignemnt.RemovedDate.HasValue)
|
||||
AddMember(userFlagAssignemnt.UserId);
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
if (!userFlagAssignment.RemovedDate.HasValue && userFlagAssignment.AddedDate >= Configuration.FilterBeginDate)
|
||||
{
|
||||
AddMember(userFlagAssignment.UserId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!userFlagAssignment.RemovedDate.HasValue)
|
||||
{
|
||||
AddMember(userFlagAssignment.UserId);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RepositoryMonitorEventType.Modified:
|
||||
if (userFlagAssignemnt.RemovedDate.HasValue)
|
||||
RemoveMember(userFlagAssignemnt.UserId);
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
if (userFlagAssignment.AddedDate >= Configuration.FilterBeginDate)
|
||||
{
|
||||
if (userFlagAssignment.RemovedDate.HasValue)
|
||||
{
|
||||
RemoveMember(userFlagAssignment.UserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddMember(userFlagAssignment.UserId);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
AddMember(userFlagAssignemnt.UserId);
|
||||
{
|
||||
if (userFlagAssignment.RemovedDate.HasValue)
|
||||
{
|
||||
RemoveMember(userFlagAssignment.UserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddMember(userFlagAssignment.UserId);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RepositoryMonitorEventType.Deleted:
|
||||
string userId = userFlagAssignemnt.UserId;
|
||||
string userId = userFlagAssignment.UserId;
|
||||
// Remove the user if no other (non-removed) assignments exist.
|
||||
RemoveMember(userId, (database) =>
|
||||
{
|
||||
if (database.UserFlagAssignments.Any(a => a.UserFlagId == UserFlagId && a.UserId == userId && !a.RemovedDate.HasValue))
|
||||
return null;
|
||||
if (Configuration.FilterBeginDate.HasValue)
|
||||
{
|
||||
if (database.UserFlagAssignments.Any(a => a.UserFlagId == UserFlagId && a.UserId == userId && !a.RemovedDate.HasValue && a.AddedDate >= Configuration.FilterBeginDate))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new string[] { userId };
|
||||
}
|
||||
}
|
||||
else
|
||||
return new string[] { userId };
|
||||
{
|
||||
if (database.UserFlagAssignments.Any(a => a.UserFlagId == UserFlagId && a.UserId == userId && !a.RemovedDate.HasValue))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new string[] { userId };
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Tasks;
|
||||
@@ -17,8 +16,6 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pDescription = "description";
|
||||
const string pIcon = "icon";
|
||||
const string pIconColour = "iconcolour";
|
||||
const string pAssignedUsersLinkedGroup = "assigneduserslinkedgroup";
|
||||
const string pAssignedUserDevicesLinkedGroup = "assigneduserdeviceslinkedgroup";
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
@@ -48,12 +45,6 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
case pIconColour:
|
||||
UpdateIconColour(flag, value);
|
||||
break;
|
||||
case pAssignedUsersLinkedGroup:
|
||||
UpdateAssignedUsersLinkedGroup(flag, value);
|
||||
break;
|
||||
case pAssignedUserDevicesLinkedGroup:
|
||||
UpdateAssignedUserDevicesLinkedGroup(flag, value);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid Update Key");
|
||||
}
|
||||
@@ -132,7 +123,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
}
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
public virtual ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -144,7 +135,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
throw new ArgumentException("Invalid User Flag Id", "id");
|
||||
|
||||
|
||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(UserFlag, GroupId);
|
||||
var syncTaskStatus = UpdateAssignedUsersLinkedGroup(UserFlag, GroupId, FilterBeginDate);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
||||
@@ -165,7 +156,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
}
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId = null, bool redirect = false)
|
||||
public virtual ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId = null, DateTime? FilterBeginDate = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -177,7 +168,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
throw new ArgumentException("Invalid User Flag Id", "id");
|
||||
|
||||
|
||||
var syncTaskStatus = UpdateAssignedUserDevicesLinkedGroup(UserFlag, GroupId);
|
||||
var syncTaskStatus = UpdateAssignedUserDevicesLinkedGroup(UserFlag, GroupId, FilterBeginDate);
|
||||
if (redirect)
|
||||
if (syncTaskStatus == null)
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
||||
@@ -256,9 +247,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(UserFlag UserFlag, string AssignedUsersLinkedGroup)
|
||||
private ScheduledTaskStatus UpdateAssignedUsersLinkedGroup(UserFlag UserFlag, string AssignedUsersLinkedGroup, DateTime? FilterBeginDate)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUsersManagedGroup.GetKey(UserFlag), AssignedUsersLinkedGroup, null);
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUsersManagedGroup.GetKey(UserFlag), AssignedUsersLinkedGroup, FilterBeginDate);
|
||||
|
||||
if (UserFlag.UsersLinkedGroup != configJson)
|
||||
{
|
||||
@@ -278,9 +269,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
return null;
|
||||
}
|
||||
private ScheduledTaskStatus UpdateAssignedUserDevicesLinkedGroup(UserFlag UserFlag, string AssignedUserDevicesLinkedGroup)
|
||||
private ScheduledTaskStatus UpdateAssignedUserDevicesLinkedGroup(UserFlag UserFlag, string AssignedUserDevicesLinkedGroup, DateTime? FilterBeginDate)
|
||||
{
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUserDevicesManagedGroup.GetKey(UserFlag), AssignedUserDevicesLinkedGroup, null);
|
||||
var configJson = ADManagedGroup.ValidConfigurationToJson(UserFlagUserDevicesManagedGroup.GetKey(UserFlag), AssignedUserDevicesLinkedGroup, FilterBeginDate);
|
||||
|
||||
if (UserFlag.UserDevicesLinkedGroup != configJson)
|
||||
{
|
||||
|
||||
@@ -12,5 +12,6 @@ namespace Disco.Web.Areas.Config.Models.Shared
|
||||
public string UpdateUrl { get; set; }
|
||||
|
||||
public ADManagedGroup ManagedGroup { get; set; }
|
||||
public bool IncludeFilterBeginDate { get; set; }
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@
|
||||
<div class="code" title="@group.Id">
|
||||
<i class="fa fa-fw fa-lg fa-link success"></i>@group.Domain.FriendlyDistinguishedNamePath(group.DistinguishedName)
|
||||
</div>
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedgroupfilterdateoption="@(Model.ManagedGroup.IncludeFilterBeginDate)" data-linkedgroupfilterdate="@(Model.ManagedGroup.Configuration.FilterBeginDate)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
||||
<a href="@(Url.Action(MVC.API.System.SyncActiveDirectoryManagedGroup(Model.ManagedGroup.Key, Context.Request.Path)))" class="button small">Synchronize Now</a>
|
||||
}
|
||||
else
|
||||
@@ -30,12 +30,12 @@
|
||||
<div class="code error">
|
||||
<i class="fa fa-fw fa-lg fa-unlink error"></i>Group Not Found: <strong class="code">@Model.ManagedGroup.Configuration.GroupId</strong>
|
||||
</div>
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="@(Model.ManagedGroup.Configuration.GroupId)" data-linkedgroupfilterdateoption="@(Model.ManagedGroup.IncludeFilterBeginDate)" data-linkedgroupfilterdate="@(Model.ManagedGroup.Configuration.FilterBeginDate)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Change Link</button>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Link Group</button>
|
||||
<button class="button small Config_LinkedGroup_LinkButton" data-linkedgroupid="" data-linkedgroupfilterdateoption="@(Model.IncludeFilterBeginDate)" data-linkedroupdescription="@(Model.CategoryDescription)" data-linkedroupupdateurl="@(Model.UpdateUrl)">Link Group</button>
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.Shared
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -154,11 +153,33 @@ WriteLiteral(" data-linkedgroupid=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupfilterdateoption=\"");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.IncludeFilterBeginDate);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupfilterdate=\"");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.Configuration.FilterBeginDate);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupdescription=\"");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.CategoryDescription);
|
||||
Write(Model.CategoryDescription);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -169,7 +190,7 @@ WriteLiteral(" data-linkedroupupdateurl=\"");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.UpdateUrl);
|
||||
Write(Model.UpdateUrl);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -180,14 +201,14 @@ WriteLiteral(">Change Link</button>\r\n");
|
||||
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1114), Tuple.Create("\"", 1228)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1275), Tuple.Create("\"", 1389)
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1121), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.System.SyncActiveDirectoryManagedGroup(Model.ManagedGroup.Key, Context.Request.Path))
|
||||
, Tuple.Create(Tuple.Create("", 1282), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.System.SyncActiveDirectoryManagedGroup(Model.ManagedGroup.Key, Context.Request.Path))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1121), false)
|
||||
, 1282), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
@@ -241,11 +262,33 @@ WriteLiteral(" data-linkedgroupid=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupfilterdateoption=\"");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.IncludeFilterBeginDate);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupfilterdate=\"");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.ManagedGroup.Configuration.FilterBeginDate);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupdescription=\"");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.CategoryDescription);
|
||||
Write(Model.CategoryDescription);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -256,7 +299,7 @@ WriteLiteral(" data-linkedroupupdateurl=\"");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.UpdateUrl);
|
||||
Write(Model.UpdateUrl);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -281,11 +324,22 @@ WriteLiteral(" class=\"button small Config_LinkedGroup_LinkButton\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupid=\"\"");
|
||||
|
||||
WriteLiteral(" data-linkedgroupfilterdateoption=\"");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.IncludeFilterBeginDate);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-linkedroupdescription=\"");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.CategoryDescription);
|
||||
Write(Model.CategoryDescription);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -296,7 +350,7 @@ WriteLiteral(" data-linkedroupupdateurl=\"");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
Write(Model.UpdateUrl);
|
||||
Write(Model.UpdateUrl);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -323,14 +377,14 @@ WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"code\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2272), Tuple.Create("\"", 2289)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2661), Tuple.Create("\"", 2678)
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\Shared\LinkedGroupInstance.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2280), Tuple.Create<System.Object, System.Int32>(group.Id
|
||||
, Tuple.Create(Tuple.Create("", 2669), Tuple.Create<System.Object, System.Int32>(group.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2280), false)
|
||||
, 2669), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
@@ -1,25 +1,45 @@
|
||||
<div id="Config_LinkedGroup_Dialog" title="Linked Group" class="dialog">
|
||||
@{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
}
|
||||
<div id="Config_LinkedGroup_Dialog" title="Linked Group" class="dialog">
|
||||
<h3 id="Config_LinkedGroup_Title"></h3>
|
||||
<form action="#" method="post">
|
||||
<table class="input">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="Config_LinkedGroup_Id">Linked Group:</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="Config_LinkedGroup_Id" type="text" name="GroupId" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="Config_LinkedGroup_FilterDate">Filter Date: </label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="Config_LinkedGroup_FilterDate" type="text" name="FilterBeginDate" placeholder="No Filter" autocomplete="off" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="info-box error">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-circle"></i><strong>Warning:</strong> This group will be managed by Disco ICT.<br />
|
||||
Any <strong>existing members will be removed from the group</strong>, and it will be automatically synchronized with related members.
|
||||
</p>
|
||||
</div>
|
||||
<form action="#" method="post">
|
||||
<div class="input">
|
||||
<label for="Config_LinkedGroup_Id">Linked Group: </label>
|
||||
<input id="Config_LinkedGroup_Id" type="text" name="GroupId" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var dialog;
|
||||
var dialogGroupId;
|
||||
var dialogFilterDate;
|
||||
var dialogTitle;
|
||||
|
||||
function showDialog(groupId, updateUrl, title) {
|
||||
function showDialog(groupId, filterDateOption, filterDateValue, updateUrl, title) {
|
||||
if (dialog == null) {
|
||||
dialog = $('#Config_LinkedGroup_Dialog').dialog({
|
||||
width: 450,
|
||||
@@ -28,6 +48,14 @@
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
dialogFilterDate = $('#Config_LinkedGroup_FilterDate');
|
||||
dialogFilterDate.datetimepicker({
|
||||
ampm: true,
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
dateFormat: 'yy/mm/dd'
|
||||
});
|
||||
|
||||
dialogGroupId = $('#Config_LinkedGroup_Id');
|
||||
dialogGroupId.focus(function () { $(this).select(); });
|
||||
dialogGroupId.autocomplete({
|
||||
@@ -68,6 +96,18 @@
|
||||
};
|
||||
|
||||
dialogGroupId.val(groupId);
|
||||
|
||||
if (!!filterDateOption) {
|
||||
if (!!filterDateValue) {
|
||||
dialogFilterDate.datetimepicker('setDate', moment(filterDateValue).toDate());
|
||||
} else {
|
||||
dialogFilterDate.val('');
|
||||
}
|
||||
dialogFilterDate.closest('tr').show();
|
||||
} else {
|
||||
dialogFilterDate.closest('tr').hide();
|
||||
}
|
||||
|
||||
dialogTitle.text(title);
|
||||
dialog.dialog('option', 'buttons', dialogButtons);
|
||||
dialog.dialog('option', 'title', 'Linked Group: ' + title);
|
||||
@@ -78,10 +118,12 @@
|
||||
$this = $(this);
|
||||
|
||||
var configuredGroupId = $this.attr('data-linkedgroupid');
|
||||
var configuredFilterBeginDate = $this.attr('data-linkedgroupfilterdate');
|
||||
var filterDateOption = $this.attr('data-linkedgroupfilterdateoption') == 'True';
|
||||
var description = $this.attr('data-linkedroupdescription');
|
||||
var updateUrl = $this.attr('data-linkedroupupdateurl');
|
||||
|
||||
showDialog(configuredGroupId, updateUrl, description);
|
||||
showDialog(configuredGroupId, filterDateOption, configuredFilterBeginDate, updateUrl, description);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.Shared
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -44,7 +43,15 @@ namespace Disco.Web.Areas.Config.Views.Shared
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 1 "..\..\Areas\Config\Views\Shared\LinkedGroupShared.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_Dialog\"");
|
||||
|
||||
@@ -56,7 +63,50 @@ WriteLiteral(">\r\n <h3");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_Title\"");
|
||||
|
||||
WriteLiteral("></h3>\r\n <div");
|
||||
WriteLiteral("></h3>\r\n <form");
|
||||
|
||||
WriteLiteral(" action=\"#\"");
|
||||
|
||||
WriteLiteral(" method=\"post\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"input\"");
|
||||
|
||||
WriteLiteral(">\r\n <tbody>\r\n <tr>\r\n <th>\r\n " +
|
||||
" <label");
|
||||
|
||||
WriteLiteral(" for=\"Config_LinkedGroup_Id\"");
|
||||
|
||||
WriteLiteral(">Linked Group:</label>\r\n </th>\r\n <td>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_Id\"");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" name=\"GroupId\"");
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
||||
" <th>\r\n <label");
|
||||
|
||||
WriteLiteral(" for=\"Config_LinkedGroup_FilterDate\"");
|
||||
|
||||
WriteLiteral(">Filter Date: </label>\r\n </th>\r\n <td>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_FilterDate\"");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" name=\"FilterBeginDate\"");
|
||||
|
||||
WriteLiteral(" placeholder=\"No Filter\"");
|
||||
|
||||
WriteLiteral(" autocomplete=\"off\"");
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n </tbody>\r\n " +
|
||||
" </table>\r\n </form>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"info-box error\"");
|
||||
|
||||
@@ -72,39 +122,15 @@ WriteLiteral(@"></i><strong>Warning:</strong> This group will be managed by Disc
|
||||
Any <strong>existing members will be removed from the group</strong>, and it will be automatically synchronized with related members.
|
||||
</p>
|
||||
</div>
|
||||
<form");
|
||||
|
||||
WriteLiteral(" action=\"#\"");
|
||||
|
||||
WriteLiteral(" method=\"post\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"input\"");
|
||||
|
||||
WriteLiteral(">\r\n <label");
|
||||
|
||||
WriteLiteral(" for=\"Config_LinkedGroup_Id\"");
|
||||
|
||||
WriteLiteral(">Linked Group: </label>\r\n <input");
|
||||
|
||||
WriteLiteral(" id=\"Config_LinkedGroup_Id\"");
|
||||
|
||||
WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" name=\"GroupId\"");
|
||||
|
||||
WriteLiteral(@" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var dialog;
|
||||
var dialogGroupId;
|
||||
var dialogFilterDate;
|
||||
var dialogTitle;
|
||||
|
||||
function showDialog(groupId, updateUrl, title) {
|
||||
function showDialog(groupId, filterDateOption, filterDateValue, updateUrl, title) {
|
||||
if (dialog == null) {
|
||||
dialog = $('#Config_LinkedGroup_Dialog').dialog({
|
||||
width: 450,
|
||||
@@ -113,13 +139,21 @@ WriteLiteral(@" />
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
dialogFilterDate = $('#Config_LinkedGroup_FilterDate');
|
||||
dialogFilterDate.datetimepicker({
|
||||
ampm: true,
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
dateFormat: 'yy/mm/dd'
|
||||
});
|
||||
|
||||
dialogGroupId = $('#Config_LinkedGroup_Id');
|
||||
dialogGroupId.focus(function () { $(this).select(); });
|
||||
dialogGroupId.autocomplete({
|
||||
source: '");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Shared\LinkedGroupShared.cshtml"
|
||||
#line 62 "..\..\Areas\Config\Views\Shared\LinkedGroupShared.cshtml"
|
||||
Write(Url.Action(MVC.API.System.SearchGroupSubjects()));
|
||||
|
||||
|
||||
@@ -144,15 +178,23 @@ WriteLiteral("\',\r\n minLength: 2,\r\n se
|
||||
" dialogGroupId.closest(\'form\').attr(\'action\', updateUrl).submit();\r\n " +
|
||||
" }\r\n dialogButtons[\'Cancel\'] = function () {\r\n $(t" +
|
||||
"his).dialog(\'close\');\r\n };\r\n\r\n dialogGroupId.val(groupId);" +
|
||||
"\r\n dialogTitle.text(title);\r\n dialog.dialog(\'option\', \'but" +
|
||||
"tons\', dialogButtons);\r\n dialog.dialog(\'option\', \'title\', \'Linked Gro" +
|
||||
"up: \' + title);\r\n dialog.dialog(\'open\');\r\n }\r\n\r\n $(docu" +
|
||||
"ment).on(\'click\', \'.Config_LinkedGroup_LinkButton\', function () {\r\n $" +
|
||||
"this = $(this);\r\n\r\n var configuredGroupId = $this.attr(\'data-linkedgr" +
|
||||
"oupid\');\r\n var description = $this.attr(\'data-linkedroupdescription\')" +
|
||||
";\r\n var updateUrl = $this.attr(\'data-linkedroupupdateurl\');\r\n\r\n " +
|
||||
" showDialog(configuredGroupId, updateUrl, description);\r\n\r\n retu" +
|
||||
"rn false;\r\n });\r\n });\r\n</script>\r\n");
|
||||
"\r\n\r\n if (!!filterDateOption) {\r\n if (!!filterDateValue" +
|
||||
") {\r\n dialogFilterDate.datetimepicker(\'setDate\', moment(filte" +
|
||||
"rDateValue).toDate());\r\n } else {\r\n dialogFilt" +
|
||||
"erDate.val(\'\');\r\n }\r\n dialogFilterDate.closest(\'tr" +
|
||||
"\').show();\r\n } else {\r\n dialogFilterDate.closest(\'tr\')" +
|
||||
".hide();\r\n }\r\n\r\n dialogTitle.text(title);\r\n dia" +
|
||||
"log.dialog(\'option\', \'buttons\', dialogButtons);\r\n dialog.dialog(\'opti" +
|
||||
"on\', \'title\', \'Linked Group: \' + title);\r\n dialog.dialog(\'open\');\r\n " +
|
||||
" }\r\n\r\n $(document).on(\'click\', \'.Config_LinkedGroup_LinkButton\', fun" +
|
||||
"ction () {\r\n $this = $(this);\r\n\r\n var configuredGroupId = " +
|
||||
"$this.attr(\'data-linkedgroupid\');\r\n var configuredFilterBeginDate = $" +
|
||||
"this.attr(\'data-linkedgroupfilterdate\');\r\n var filterDateOption = $th" +
|
||||
"is.attr(\'data-linkedgroupfilterdateoption\') == \'True\';\r\n var descript" +
|
||||
"ion = $this.attr(\'data-linkedroupdescription\');\r\n var updateUrl = $th" +
|
||||
"is.attr(\'data-linkedroupupdateurl\');\r\n\r\n showDialog(configuredGroupId" +
|
||||
", filterDateOption, configuredFilterBeginDate, updateUrl, description);\r\n\r\n " +
|
||||
" return false;\r\n });\r\n });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,57 +21,62 @@
|
||||
<div id="Config_UserFlags_Show" class="form@(hideAdvanced ? " Config_HideAdvanced" : null)" style="width: 550px">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 150px">Id:
|
||||
<th style="width: 150px">
|
||||
Id:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DisplayFor(model => model.UserFlag.Id)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name:
|
||||
<th>
|
||||
Name:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{@Html.EditorFor(model => model.UserFlag.Name)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#UserFlag_Name'),
|
||||
'Invalid Name',
|
||||
'@(Url.Action(MVC.API.UserFlag.UpdateName(Model.UserFlag.Id)))',
|
||||
'FlagName'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<td>
|
||||
@if (canConfig)
|
||||
{@Html.EditorFor(model => model.UserFlag.Name)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#UserFlag_Name'),
|
||||
'Invalid Name',
|
||||
'@(Url.Action(MVC.API.UserFlag.UpdateName(Model.UserFlag.Id)))',
|
||||
'FlagName'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.UserFlag.Name
|
||||
@Model.UserFlag.Name
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:
|
||||
<th>
|
||||
Description:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
<td>
|
||||
@if (canConfig)
|
||||
{@Html.EditorFor(model => model.UserFlag.Description)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#UserFlag_Description'),
|
||||
'Invalid Description',
|
||||
'@(Url.Action(MVC.API.UserFlag.UpdateDescription(Model.UserFlag.Id)))',
|
||||
'Description'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#UserFlag_Description'),
|
||||
'Invalid Description',
|
||||
'@(Url.Action(MVC.API.UserFlag.UpdateDescription(Model.UserFlag.Id)))',
|
||||
'Description'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<pre>
|
||||
<pre>
|
||||
@if (string.IsNullOrEmpty(Model.UserFlag.Description))
|
||||
{
|
||||
<text><None></text>
|
||||
@@ -85,7 +90,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Statistics:
|
||||
<th>
|
||||
Statistics:
|
||||
</th>
|
||||
<td>
|
||||
<div><strong>@Model.CurrentAssignmentCount user@(Model.CurrentAssignmentCount != 1 ? "s" : null) currently assigned</strong></div>
|
||||
@@ -93,7 +99,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Icon:
|
||||
<th>
|
||||
Icon:
|
||||
</th>
|
||||
<td>
|
||||
<i id="Config_UserFlags_Icon" data-icon="@(Model.UserFlag.Icon)" data-colour="@(Model.UserFlag.IconColour)" class="fa fa-@(Model.UserFlag.Icon) fa-4x d-@(Model.UserFlag.IconColour)"></i>
|
||||
@@ -216,7 +223,8 @@
|
||||
</tr>
|
||||
}
|
||||
<tr class="Config_HideAdvanced_Item">
|
||||
<th>Linked Groups:
|
||||
<th>
|
||||
Linked Groups:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@@ -226,6 +234,7 @@
|
||||
CategoryDescription = UserFlagUsersManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUsersManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UsersLinkedGroup,
|
||||
IncludeFilterBeginDate = true,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUsersLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
})
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
@@ -234,10 +243,11 @@
|
||||
CategoryDescription = UserFlagUserDevicesManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUserDevicesManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UserDevicesLinkedGroup,
|
||||
IncludeFilterBeginDate = true,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUserDevicesLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
})
|
||||
@if (canConfig)
|
||||
{
|
||||
{
|
||||
@Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)
|
||||
}
|
||||
</div>
|
||||
@@ -266,7 +276,7 @@
|
||||
<h5><i class="fa fa-repeat fa-fw"></i>Override</h5>
|
||||
<p>
|
||||
Specified users will have this flag <strong>added</strong>. Specified users which already have this flag will be skipped.
|
||||
Users who already have this flag but are not specified will have the flag <strong>removed</strong>.
|
||||
Users who already have this flag but are not specified will have the flag <strong>removed</strong>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -104,184 +103,199 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 150px\"");
|
||||
|
||||
WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(">\r\n Id:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.DisplayFor(model => model.UserFlag.Id));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
|
||||
" </th>\r\n <td>");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Name:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Name));
|
||||
#line 37 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
#line 38 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#UserFlag_Name\'),\r\n" +
|
||||
" \'Invalid Name\',\r\n \'");
|
||||
WriteLiteral(">\r\n $(function () {\r\n document." +
|
||||
"DiscoFunctions.PropertyChangeHelper(\r\n $(\'#UserFl" +
|
||||
"ag_Name\'),\r\n \'Invalid Name\',\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateName(Model.UserFlag.Id)));
|
||||
#line 45 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateName(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'FlagName\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
WriteLiteral("\',\r\n \'FlagName\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 50 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Description:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Description:\r\n " +
|
||||
" </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 62 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 63 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 63 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
#line 64 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
#line 65 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#UserFlag_Descripti" +
|
||||
"on\'),\r\n \'Invalid Description\',\r\n " +
|
||||
" \'");
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#UserFlag_Description'),
|
||||
'Invalid Description',
|
||||
'");
|
||||
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateDescription(Model.UserFlag.Id)));
|
||||
#line 71 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateDescription(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'Description\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
WriteLiteral("\',\r\n \'Description\'\r\n );" +
|
||||
"\r\n });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 76 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -289,16 +303,16 @@ WriteLiteral("\',\r\n \'Description\'\r\n
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <pre>\r\n");
|
||||
WriteLiteral(" <pre>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 80 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 75 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 80 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (string.IsNullOrEmpty(Model.UserFlag.Description))
|
||||
{
|
||||
|
||||
@@ -312,7 +326,7 @@ WriteLiteral("<None>");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 83 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -321,14 +335,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 86 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Description.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 86 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -338,17 +352,18 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" </pre>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 89 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Statistics:\r\n " +
|
||||
" </th>\r\n <td>\r\n <div><strong>");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Statistics:\r\n </th>\r\n <td>\r\n <div><strong>" +
|
||||
"");
|
||||
|
||||
|
||||
#line 91 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 97 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount);
|
||||
|
||||
|
||||
@@ -357,7 +372,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n
|
||||
WriteLiteral(" user");
|
||||
|
||||
|
||||
#line 91 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 97 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -366,7 +381,7 @@ WriteLiteral(" user");
|
||||
WriteLiteral(" currently assigned</strong></div>\r\n <div>");
|
||||
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 98 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.TotalAssignmentCount);
|
||||
|
||||
|
||||
@@ -375,21 +390,21 @@ WriteLiteral(" currently assigned</strong></div>\r\n <div>");
|
||||
WriteLiteral(" total user historical assignment");
|
||||
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 98 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.TotalAssignmentCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Icon:\r\n " +
|
||||
" </th>\r\n <td>\r\n <i");
|
||||
WriteLiteral("</div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
||||
" Icon:\r\n </th>\r\n <td>\r\n <i");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Icon\"");
|
||||
|
||||
WriteLiteral(" data-icon=\"");
|
||||
|
||||
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 106 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Icon);
|
||||
|
||||
|
||||
@@ -400,7 +415,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-colour=\"");
|
||||
|
||||
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 106 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.IconColour);
|
||||
|
||||
|
||||
@@ -408,37 +423,37 @@ WriteLiteral(" data-colour=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4042), Tuple.Create("\"", 4115)
|
||||
, Tuple.Create(Tuple.Create("", 4050), Tuple.Create("fa", 4050), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4052), Tuple.Create("fa-", 4053), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4268), Tuple.Create("\"", 4341)
|
||||
, Tuple.Create(Tuple.Create("", 4276), Tuple.Create("fa", 4276), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4278), Tuple.Create("fa-", 4279), true)
|
||||
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4056), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.Icon
|
||||
#line 106 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4282), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4056), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 4078), Tuple.Create("fa-4x", 4079), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4084), Tuple.Create("d-", 4085), true)
|
||||
, 4282), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 4304), Tuple.Create("fa-4x", 4305), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4310), Tuple.Create("d-", 4311), true)
|
||||
|
||||
#line 99 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4087), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.IconColour
|
||||
#line 106 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4313), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4087), false)
|
||||
, 4313), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 100 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 107 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 100 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 107 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
@@ -468,13 +483,13 @@ WriteLiteral(" class=\"icons\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 107 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 114 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 107 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 114 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
foreach (var icon in Model.Icons)
|
||||
{
|
||||
|
||||
@@ -486,7 +501,7 @@ WriteLiteral(" <i");
|
||||
WriteLiteral(" data-icon=\"");
|
||||
|
||||
|
||||
#line 109 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 116 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(icon.Key);
|
||||
|
||||
|
||||
@@ -494,32 +509,32 @@ WriteLiteral(" data-icon=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4680), Tuple.Create("\"", 4705)
|
||||
, Tuple.Create(Tuple.Create("", 4688), Tuple.Create("fa", 4688), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4690), Tuple.Create("fa-", 4691), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4906), Tuple.Create("\"", 4931)
|
||||
, Tuple.Create(Tuple.Create("", 4914), Tuple.Create("fa", 4914), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4916), Tuple.Create("fa-", 4917), true)
|
||||
|
||||
#line 109 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4694), Tuple.Create<System.Object, System.Int32>(icon.Key
|
||||
#line 116 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4920), Tuple.Create<System.Object, System.Int32>(icon.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4694), false)
|
||||
, 4920), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4706), Tuple.Create("\"", 4725)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4932), Tuple.Create("\"", 4951)
|
||||
|
||||
#line 109 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4714), Tuple.Create<System.Object, System.Int32>(icon.Value
|
||||
#line 116 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4940), Tuple.Create<System.Object, System.Int32>(icon.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4714), false)
|
||||
, 4940), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 110 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 117 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -532,13 +547,13 @@ WriteLiteral(" class=\"colours\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 113 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 120 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 113 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 120 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
foreach (var colour in Model.ThemeColours)
|
||||
{
|
||||
|
||||
@@ -550,7 +565,7 @@ WriteLiteral(" <i");
|
||||
WriteLiteral(" data-colour=\"");
|
||||
|
||||
|
||||
#line 115 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 122 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(colour.Key);
|
||||
|
||||
|
||||
@@ -558,33 +573,33 @@ WriteLiteral(" data-colour=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 5057), Tuple.Create("\"", 5093)
|
||||
, Tuple.Create(Tuple.Create("", 5065), Tuple.Create("fa", 5065), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 5067), Tuple.Create("fa-square", 5068), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 5077), Tuple.Create("d-", 5078), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 5283), Tuple.Create("\"", 5319)
|
||||
, Tuple.Create(Tuple.Create("", 5291), Tuple.Create("fa", 5291), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 5293), Tuple.Create("fa-square", 5294), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 5303), Tuple.Create("d-", 5304), true)
|
||||
|
||||
#line 115 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5080), Tuple.Create<System.Object, System.Int32>(colour.Key
|
||||
#line 122 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5306), Tuple.Create<System.Object, System.Int32>(colour.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5080), false)
|
||||
, 5306), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5094), Tuple.Create("\"", 5115)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5320), Tuple.Create("\"", 5341)
|
||||
|
||||
#line 115 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5102), Tuple.Create<System.Object, System.Int32>(colour.Value
|
||||
#line 122 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5328), Tuple.Create<System.Object, System.Int32>(colour.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5102), false)
|
||||
, 5328), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 116 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 123 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -631,7 +646,7 @@ WriteLiteral(" </div>\r\n
|
||||
"save() {\r\n var url = \'");
|
||||
|
||||
|
||||
#line 176 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 183 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateIconAndColour(id: Model.UserFlag.Id, redirect: true)));
|
||||
|
||||
|
||||
@@ -662,7 +677,7 @@ WriteLiteral(@"',
|
||||
");
|
||||
|
||||
|
||||
#line 198 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 205 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -671,13 +686,13 @@ WriteLiteral(@"',
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 208 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 208 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (hideAdvanced)
|
||||
{
|
||||
|
||||
@@ -711,7 +726,7 @@ WriteLiteral(@">Show Advanced Options</button>
|
||||
");
|
||||
|
||||
|
||||
#line 217 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 224 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -721,19 +736,20 @@ WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" class=\"Config_HideAdvanced_Item\"");
|
||||
|
||||
WriteLiteral(">\r\n <th>Linked Groups:\r\n </th>\r\n <td>\r\n " +
|
||||
" <div>\r\n");
|
||||
WriteLiteral(">\r\n <th>\r\n Linked Groups:\r\n </th>\r\n " +
|
||||
" <td>\r\n <div>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 223 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 231 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = UserFlagUsersManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUsersManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UsersLinkedGroup,
|
||||
IncludeFilterBeginDate = true,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUsersLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
}));
|
||||
|
||||
@@ -745,13 +761,14 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 231 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 240 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
||||
{
|
||||
CanConfigure = canConfig,
|
||||
CategoryDescription = UserFlagUserDevicesManagedGroup.GetCategoryDescription(Model.UserFlag),
|
||||
Description = UserFlagUserDevicesManagedGroup.GetDescription(Model.UserFlag),
|
||||
ManagedGroup = Model.UserDevicesLinkedGroup,
|
||||
IncludeFilterBeginDate = true,
|
||||
UpdateUrl = Url.Action(MVC.API.UserFlag.UpdateAssignedUserDevicesLinkedGroup(Model.UserFlag.Id, redirect: true))
|
||||
}));
|
||||
|
||||
@@ -761,28 +778,28 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 239 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 249 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 239 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 249 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 241 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 251 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 241 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 251 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -792,7 +809,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 248 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 258 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canBulkAssignment || canDelete || canShowUsers)
|
||||
{
|
||||
|
||||
@@ -806,13 +823,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 251 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 261 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 251 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 261 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canBulkAssignment)
|
||||
{
|
||||
|
||||
@@ -862,7 +879,7 @@ WriteLiteral(" class=\"fa fa-repeat fa-fw\"");
|
||||
WriteLiteral(@"></i>Override</h5>
|
||||
<p>
|
||||
Specified users will have this flag <strong>added</strong>. Specified users which already have this flag will be skipped.
|
||||
Users who already have this flag but are not specified will have the flag <strong>removed</strong>.
|
||||
Users who already have this flag but are not specified will have the flag <strong>removed</strong>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -898,7 +915,7 @@ WriteLiteral(">\r\n user6<br />\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 284 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 294 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
|
||||
|
||||
|
||||
@@ -911,7 +928,7 @@ WriteLiteral(" class=\"code\"");
|
||||
WriteLiteral(">user6,smi0099,");
|
||||
|
||||
|
||||
#line 286 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 296 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
|
||||
|
||||
|
||||
@@ -924,7 +941,7 @@ WriteLiteral(" class=\"code\"");
|
||||
WriteLiteral(">user6;smi0099;");
|
||||
|
||||
|
||||
#line 287 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 297 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(ActiveDirectory.Context.PrimaryDomain.NetBiosName);
|
||||
|
||||
|
||||
@@ -999,7 +1016,7 @@ WriteLiteral(" <script>\r\n $(function () {\r\n
|
||||
"\').attr(\'action\', \'");
|
||||
|
||||
|
||||
#line 354 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 364 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, true)));
|
||||
|
||||
|
||||
@@ -1009,7 +1026,7 @@ WriteLiteral("\');\r\n\r\n assignDialog.addClass(\'lo
|
||||
" $.getJSON(\'");
|
||||
|
||||
|
||||
#line 357 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 367 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.AssignedUsers(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
@@ -1035,7 +1052,7 @@ WriteLiteral(@"', function (response, result) {
|
||||
assignUserIds.closest('form').attr('action', '");
|
||||
|
||||
|
||||
#line 374 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 384 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.BulkAssignUsers(Model.UserFlag.Id, false)));
|
||||
|
||||
|
||||
@@ -1056,7 +1073,7 @@ WriteLiteral(@"');
|
||||
");
|
||||
|
||||
|
||||
#line 386 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 396 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1065,13 +1082,13 @@ WriteLiteral(@"');
|
||||
WriteLiteral("\r\n\r\n\r\n");
|
||||
|
||||
|
||||
#line 390 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 400 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 390 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 400 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canDelete)
|
||||
{
|
||||
|
||||
@@ -1079,14 +1096,14 @@ WriteLiteral("\r\n\r\n\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 392 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 402 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Delete", MVC.API.UserFlag.Delete(Model.UserFlag.Id, true), "Config_UserFlags_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 392 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 402 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -1106,13 +1123,13 @@ WriteLiteral("></i>\r\n This item will be permanently deleted
|
||||
"covered.<br />\r\n <br />\r\n");
|
||||
|
||||
|
||||
#line 398 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 408 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 398 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 408 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (Model.CurrentAssignmentCount > 0)
|
||||
{
|
||||
|
||||
@@ -1122,7 +1139,7 @@ WriteLiteral("></i>\r\n This item will be permanently deleted
|
||||
WriteLiteral(" <strong>");
|
||||
|
||||
|
||||
#line 400 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 410 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount);
|
||||
|
||||
|
||||
@@ -1131,7 +1148,7 @@ WriteLiteral(" <strong>");
|
||||
WriteLiteral(" user");
|
||||
|
||||
|
||||
#line 400 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 410 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount != 1 ? "s are" : " is");
|
||||
|
||||
|
||||
@@ -1144,7 +1161,7 @@ WriteLiteral(" <br />\r\n");
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
|
||||
#line 403 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 413 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1187,7 +1204,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 435 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 445 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1196,7 +1213,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 436 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 446 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canShowUsers)
|
||||
{
|
||||
|
||||
@@ -1204,14 +1221,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 438 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 448 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.ActionLinkButton(string.Format("Show {0} user{1}", Model.CurrentAssignmentCount, (Model.CurrentAssignmentCount == 1 ? null : "s")), MVC.Search.Query(Model.UserFlag.Id.ToString(), "UserFlag"), "Config_UserFlags_Actions_ShowUsers_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 438 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 448 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -1221,7 +1238,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 441 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
#line 451 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -117,9 +117,12 @@
|
||||
#Config_LinkedGroup_Dialog h3 {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
#Config_LinkedGroup_Dialog div.input {
|
||||
#Config_LinkedGroup_Dialog table.input {
|
||||
margin-top: 12px;
|
||||
}
|
||||
#Config_LinkedGroup_Dialog table.input th {
|
||||
text-align: right;
|
||||
}
|
||||
#expressionEditor #expressionEditorExceptionContainer {
|
||||
display: none;
|
||||
border: 1px dashed #FF9696;
|
||||
|
||||
@@ -49,8 +49,12 @@
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
div.input {
|
||||
table.input {
|
||||
margin-top: 12px;
|
||||
|
||||
th {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -239,6 +239,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup s_params_UpdateAssignedUserDevicesLinkedGroup = new ActionParamsClass_UpdateAssignedUserDevicesLinkedGroup();
|
||||
@@ -249,6 +250,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string GroupId = "GroupId";
|
||||
public readonly string FilterBeginDate = "FilterBeginDate";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
|
||||
@@ -385,30 +387,32 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
partial void UpdateAssignedUsersLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, bool redirect)
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUsersLinkedGroup(int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUsersLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
UpdateAssignedUsersLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateAssignedUserDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, bool redirect);
|
||||
partial void UpdateAssignedUserDevicesLinkedGroupOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId, bool redirect)
|
||||
public override System.Web.Mvc.ActionResult UpdateAssignedUserDevicesLinkedGroup(int id, string GroupId, System.DateTime? FilterBeginDate, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateAssignedUserDevicesLinkedGroup);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "GroupId", GroupId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "FilterBeginDate", FilterBeginDate);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateAssignedUserDevicesLinkedGroupOverride(callInfo, id, GroupId, redirect);
|
||||
UpdateAssignedUserDevicesLinkedGroupOverride(callInfo, id, GroupId, FilterBeginDate, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user