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