


// <auto-generated />
// This file was generated by a T4 template.
// Don't change it directly as your change would get overwritten.  Instead, make changes
// to the .tt file (i.e. the T4 template) and save it to regenerate this file.
using Disco.Models.Services.Authorization;
using Disco.Models.Repository;
using Disco.Services.Authorization.Roles;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Disco.Services.Authorization
{
	public static class Claims
	{
		private static Dictionary<string, Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>> _roleClaims;
		private static ClaimNavigatorItem _claimNavigator;

		static Claims()
        {
#region Role Claim Dictionary
            _roleClaims = new Dictionary<string, Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>>()
			{
				{ "Config.DeviceCertificate.DownloadCertificates", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceCertificate.DownloadCertificates, (c, v) => c.Config.DeviceCertificate.DownloadCertificates = v, "Download Certificates", "Can download certificates", false) },
				{ "Config.Enrolment.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Enrolment.Configure, (c, v) => c.Config.Enrolment.Configure = v, "Configure Enrolment", "Can configure device enrolment", false) },
				{ "Config.Enrolment.DownloadBootstrapper", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Enrolment.DownloadBootstrapper, (c, v) => c.Config.Enrolment.DownloadBootstrapper = v, "Download Bootstrapper", "Can download the Device Bootstrapper", false) },
				{ "Config.Enrolment.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Enrolment.Show, (c, v) => c.Config.Enrolment.Show = v, "Show Enrolment", "Can show device enrolment", false) },
				{ "Config.Enrolment.ShowStatus", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Enrolment.ShowStatus, (c, v) => c.Config.Enrolment.ShowStatus = v, "Show Enrolment Status", "Can show the enrolment status", false) },
				{ "Config.DeviceBatch.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceBatch.Configure, (c, v) => c.Config.DeviceBatch.Configure = v, "Configure Device Batches", "Can configure device batches", false) },
				{ "Config.DeviceBatch.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceBatch.Create, (c, v) => c.Config.DeviceBatch.Create = v, "Create Device Batches", "Can create device batches", false) },
				{ "Config.DeviceBatch.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceBatch.Delete, (c, v) => c.Config.DeviceBatch.Delete = v, "Delete Device Batches", "Can delete device batches", false) },
				{ "Config.DeviceBatch.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceBatch.Show, (c, v) => c.Config.DeviceBatch.Show = v, "Show Device Batches", "Can show device batches", false) },
				{ "Config.DeviceBatch.ShowTimeline", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceBatch.ShowTimeline, (c, v) => c.Config.DeviceBatch.ShowTimeline = v, "Show Timeline", "Can show device batch timeline", false) },
				{ "Config.DeviceModel.ConfigureComponents", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceModel.ConfigureComponents, (c, v) => c.Config.DeviceModel.ConfigureComponents = v, "Configure Device Model Components", "Can configure device model components", false) },
				{ "Config.DeviceModel.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceModel.Configure, (c, v) => c.Config.DeviceModel.Configure = v, "Configure Device Models", "Can configure device models", false) },
				{ "Config.DeviceModel.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceModel.Delete, (c, v) => c.Config.DeviceModel.Delete = v, "Delete Device Models", "Can delete device models", false) },
				{ "Config.DeviceModel.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceModel.Show, (c, v) => c.Config.DeviceModel.Show = v, "Show Device Models", "Can show device models", false) },
				{ "Config.DeviceProfile.ConfigureComputerNameTemplate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.ConfigureComputerNameTemplate, (c, v) => c.Config.DeviceProfile.ConfigureComputerNameTemplate = v, "Configure Computer Name Templates", "Can configure computer name templates for device profiles", false) },
				{ "Config.DeviceProfile.ConfigureDefaults", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.ConfigureDefaults, (c, v) => c.Config.DeviceProfile.ConfigureDefaults = v, "Configure Default Device Profiles", "Can configure default device profiles", false) },
				{ "Config.DeviceProfile.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Configure, (c, v) => c.Config.DeviceProfile.Configure = v, "Configure Device Profiles", "Can configure device profiles", false) },
				{ "Config.DeviceProfile.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Create, (c, v) => c.Config.DeviceProfile.Create = v, "Create Device Profiles", "Can create device profiles", false) },
				{ "Config.DeviceProfile.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Delete, (c, v) => c.Config.DeviceProfile.Delete = v, "Delete Device Profiles", "Can delete device profiles", false) },
				{ "Config.DeviceProfile.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DeviceProfile.Show, (c, v) => c.Config.DeviceProfile.Show = v, "Show Device Profiles", "Can show device profiles", false) },
				{ "Config.DocumentTemplate.BulkGenerate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.BulkGenerate, (c, v) => c.Config.DocumentTemplate.BulkGenerate = v, "Bulk Generate Document Templates", "Can bulk generate document templates", false) },
				{ "Config.DocumentTemplate.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Configure, (c, v) => c.Config.DocumentTemplate.Configure = v, "Configure Document Templates", "Can configure document templates", false) },
				{ "Config.DocumentTemplate.ConfigureFilterExpression", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.ConfigureFilterExpression, (c, v) => c.Config.DocumentTemplate.ConfigureFilterExpression = v, "Configure Filter Expression", "Can configure filter expressions for document templates", false) },
				{ "Config.DocumentTemplate.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Create, (c, v) => c.Config.DocumentTemplate.Create = v, "Create Document Templates", "Can create document templates", false) },
				{ "Config.DocumentTemplate.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Delete, (c, v) => c.Config.DocumentTemplate.Delete = v, "Delete Document Templates", "Can delete document templates", false) },
				{ "Config.DocumentTemplate.UndetectedPages", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.UndetectedPages, (c, v) => c.Config.DocumentTemplate.UndetectedPages = v, "Process Undetected Pages", "Can show and assign imported documents which were not undetected", false) },
				{ "Config.DocumentTemplate.ShowStatus", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.ShowStatus, (c, v) => c.Config.DocumentTemplate.ShowStatus = v, "Show Document Template Import Status", "Can show the document template import status", false) },
				{ "Config.DocumentTemplate.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Show, (c, v) => c.Config.DocumentTemplate.Show = v, "Show Document Templates", "Can show document templates", false) },
				{ "Config.DocumentTemplate.Upload", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.DocumentTemplate.Upload, (c, v) => c.Config.DocumentTemplate.Upload = v, "Upload Document Templates", "Can upload document templates", false) },
				{ "Config.Logging.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Logging.Show, (c, v) => c.Config.Logging.Show = v, "Show Logging", "Can show logging", false) },
				{ "Config.Plugin.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Plugin.Configure, (c, v) => c.Config.Plugin.Configure = v, "Configure Plugins", "Can configure plugins", false) },
				{ "Config.Plugin.InstallLocal", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Plugin.InstallLocal, (c, v) => c.Config.Plugin.InstallLocal = v, "Install/Update Local Plugins", "Can install and update locally uploaded plugins", false) },
				{ "Config.Plugin.Install", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Plugin.Install, (c, v) => c.Config.Plugin.Install = v, "Install/Update Plugins", "Can install and update plugins", false) },
				{ "Config.Plugin.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Plugin.Show, (c, v) => c.Config.Plugin.Show = v, "Show Plugins", "Can show plugins", false) },
				{ "Config.Plugin.Uninstall", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Plugin.Uninstall, (c, v) => c.Config.Plugin.Uninstall = v, "Uninstall Plugins", "Can uninstall plugins", false) },
				{ "Config.System.ConfigureActiveDirectory", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.System.ConfigureActiveDirectory, (c, v) => c.Config.System.ConfigureActiveDirectory = v, "Configure Active Directory Settings", "Can configure the Active Directory interoperability settings", false) },
				{ "Config.System.ConfigureProxy", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.System.ConfigureProxy, (c, v) => c.Config.System.ConfigureProxy = v, "Configure Proxy Settings", "Can configure the proxy settings", false) },
				{ "Config.System.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.System.Show, (c, v) => c.Config.System.Show = v, "Show System Configuration", "Can show the system configuration", false) },
				{ "Config.Organisation.ConfigureAddresses", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Organisation.ConfigureAddresses, (c, v) => c.Config.Organisation.ConfigureAddresses = v, "Configure Addresses", "Can configure organisation addresses", false) },
				{ "Config.Organisation.ConfigureLogo", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Organisation.ConfigureLogo, (c, v) => c.Config.Organisation.ConfigureLogo = v, "Configure Logo", "Can configure the organisation logo", false) },
				{ "Config.Organisation.ConfigureMultiSiteMode", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Organisation.ConfigureMultiSiteMode, (c, v) => c.Config.Organisation.ConfigureMultiSiteMode = v, "Configure Multi-Site Mode", "Can configure multi-site mode", false) },
				{ "Config.Organisation.ConfigureName", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Organisation.ConfigureName, (c, v) => c.Config.Organisation.ConfigureName = v, "Configure Name", "Can configure the organisation name", false) },
				{ "Config.Organisation.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Organisation.Show, (c, v) => c.Config.Organisation.Show = v, "Show Organisation Details", "Can show the organisation details", false) },
				{ "Config.JobPreferences.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.JobPreferences.Configure, (c, v) => c.Config.JobPreferences.Configure = v, "Configure Job Preferences", "Can configure job preferences", false) },
				{ "Config.JobPreferences.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.JobPreferences.Show, (c, v) => c.Config.JobPreferences.Show = v, "Show Job Preferences", "Can show job preferences", false) },
				{ "Config.JobQueue.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.JobQueue.Configure, (c, v) => c.Config.JobQueue.Configure = v, "Configure Job Queues", "Can configure job queues", false) },
				{ "Config.JobQueue.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.JobQueue.Create, (c, v) => c.Config.JobQueue.Create = v, "Create Job Queues", "Can create job queues", false) },
				{ "Config.JobQueue.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.JobQueue.Delete, (c, v) => c.Config.JobQueue.Delete = v, "Delete Job Queues", "Can delete job queues", false) },
				{ "Config.JobQueue.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.JobQueue.Show, (c, v) => c.Config.JobQueue.Show = v, "Show Job Queues", "Can show job queues", false) },
				{ "Config.UserFlag.Configure", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.UserFlag.Configure, (c, v) => c.Config.UserFlag.Configure = v, "Configure User Flags", "Can configure user flags", false) },
				{ "Config.UserFlag.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.UserFlag.Create, (c, v) => c.Config.UserFlag.Create = v, "Create User Flags", "Can create user flags", false) },
				{ "Config.UserFlag.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.UserFlag.Delete, (c, v) => c.Config.UserFlag.Delete = v, "Delete User Flags", "Can delete user flags", false) },
				{ "Config.UserFlag.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.UserFlag.Show, (c, v) => c.Config.UserFlag.Show = v, "Show User Flags", "Can show user flags", false) },
				{ "Config.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Config.Show, (c, v) => c.Config.Show = v, "Show Configuration", "Can show the configuration menu", false) },
				{ "Job.Lists.AllOpen", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AllOpen, (c, v) => c.Job.Lists.AllOpen = v, "All Open List", "Can show list", false) },
				{ "Job.Lists.AwaitingFinanceAgreementBreach", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AwaitingFinanceAgreementBreach, (c, v) => c.Job.Lists.AwaitingFinanceAgreementBreach = v, "Awaiting Finance Agreement Breach List", "Can show list (NOTE: Requires Awaiting Finance List)", false) },
				{ "Job.Lists.AwaitingFinanceCharge", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AwaitingFinanceCharge, (c, v) => c.Job.Lists.AwaitingFinanceCharge = v, "Awaiting Finance Charge List", "Can show list (NOTE: Requires Awaiting Finance List)", false) },
				{ "Job.Lists.AwaitingFinanceInsuranceProcessing", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AwaitingFinanceInsuranceProcessing, (c, v) => c.Job.Lists.AwaitingFinanceInsuranceProcessing = v, "Awaiting Finance Insurance Processing List", "Can show list (NOTE: Requires Awaiting Finance List)", false) },
				{ "Job.Lists.AwaitingFinance", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AwaitingFinance, (c, v) => c.Job.Lists.AwaitingFinance = v, "Awaiting Finance List", "Can show list", false) },
				{ "Job.Lists.AwaitingFinancePayment", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AwaitingFinancePayment, (c, v) => c.Job.Lists.AwaitingFinancePayment = v, "Awaiting Finance Payment List", "Can show list (NOTE: Requires Awaiting Finance List)", false) },
				{ "Job.Lists.AwaitingTechnicianAction", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AwaitingTechnicianAction, (c, v) => c.Job.Lists.AwaitingTechnicianAction = v, "Awaiting Technician Action List", "Can show list", false) },
				{ "Job.Lists.AwaitingUserAction", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.AwaitingUserAction, (c, v) => c.Job.Lists.AwaitingUserAction = v, "Awaiting User Action List", "Can show list", false) },
				{ "Job.Lists.DevicesAwaitingRepair", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.DevicesAwaitingRepair, (c, v) => c.Job.Lists.DevicesAwaitingRepair = v, "Devices Awaiting Repair List", "Can show list", false) },
				{ "Job.Lists.DevicesReadyForReturn", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.DevicesReadyForReturn, (c, v) => c.Job.Lists.DevicesReadyForReturn = v, "Devices Ready For Return List", "Can show list", false) },
				{ "Job.Lists.JobQueueLists", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.JobQueueLists, (c, v) => c.Job.Lists.JobQueueLists = v, "Job Queue Lists", "Can show job queue lists", false) },
				{ "Job.Lists.Locations", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.Locations, (c, v) => c.Job.Lists.Locations = v, "Locations List", "Can show list", false) },
				{ "Job.Lists.LongRunningJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.LongRunningJobs, (c, v) => c.Job.Lists.LongRunningJobs = v, "Long Running Jobs List", "Can show list", false) },
				{ "Job.Lists.MyJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.MyJobs, (c, v) => c.Job.Lists.MyJobs = v, "My Jobs List", "Can show list", false) },
				{ "Job.Lists.MyJobsOrphaned", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.MyJobsOrphaned, (c, v) => c.Job.Lists.MyJobsOrphaned = v, "My Jobs List (Includes No Queue)", "Can show list", false) },
				{ "Job.Lists.RecentlyClosed", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.RecentlyClosed, (c, v) => c.Job.Lists.RecentlyClosed = v, "Recently Closed List", "Can show list", false) },
				{ "Job.Lists.StaleJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Lists.StaleJobs, (c, v) => c.Job.Lists.StaleJobs = v, "Stale Jobs List", "Can show list", false) },
				{ "Job.Actions.AddAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.AddAttachments, (c, v) => c.Job.Actions.AddAttachments = v, "Add Attachments", "Can add attachments to jobs", false) },
				{ "Job.Actions.AddLogs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.AddLogs, (c, v) => c.Job.Actions.AddLogs = v, "Add Logs", "Can add job logs", false) },
				{ "Job.Actions.AddAnyQueues", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.AddAnyQueues, (c, v) => c.Job.Actions.AddAnyQueues = v, "Add to Any Queues", "Can add to any job queues", false) },
				{ "Job.Actions.AddOwnQueues", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.AddOwnQueues, (c, v) => c.Job.Actions.AddOwnQueues = v, "Add to Own Queues", "Can add to own job queues", false) },
				{ "Job.Actions.Close", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.Close, (c, v) => c.Job.Actions.Close = v, "Close Jobs", "Can close jobs", false) },
				{ "Job.Actions.ConvertHWarToHNWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.ConvertHWarToHNWar, (c, v) => c.Job.Actions.ConvertHWarToHNWar = v, "Convert HWar Jobs To HNWar", "Can convert warranty jobs to non-warranty jobs", false) },
				{ "Job.Actions.Create", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.Create, (c, v) => c.Job.Actions.Create = v, "Create Jobs", "Can create jobs", false) },
				{ "Job.Actions.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.Delete, (c, v) => c.Job.Actions.Delete = v, "Delete Jobs", "Can delete jobs", false) },
				{ "Job.Actions.ForceClose", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.ForceClose, (c, v) => c.Job.Actions.ForceClose = v, "Force Close Jobs", "Can force close jobs", false) },
				{ "Job.Actions.GenerateDocuments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.GenerateDocuments, (c, v) => c.Job.Actions.GenerateDocuments = v, "Generate Documents", "Can generate documents for jobs", false) },
				{ "Job.Actions.LogRepair", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.LogRepair, (c, v) => c.Job.Actions.LogRepair = v, "Log Repair", "Can log repair for non-warranty jobs", false) },
				{ "Job.Actions.LogWarranty", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.LogWarranty, (c, v) => c.Job.Actions.LogWarranty = v, "Log Warranty", "Can log warranty for jobs", false) },
				{ "Job.Actions.RemoveAnyAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.RemoveAnyAttachments, (c, v) => c.Job.Actions.RemoveAnyAttachments = v, "Remove Any Attachments", "Can remove any attachments from jobs", false) },
				{ "Job.Actions.RemoveAnyLogs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.RemoveAnyLogs, (c, v) => c.Job.Actions.RemoveAnyLogs = v, "Remove Any Logs", "Can remove any job logs", false) },
				{ "Job.Actions.RemoveAnyQueues", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.RemoveAnyQueues, (c, v) => c.Job.Actions.RemoveAnyQueues = v, "Remove from Any Queues", "Can remove from any job queues", false) },
				{ "Job.Actions.RemoveOwnQueues", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.RemoveOwnQueues, (c, v) => c.Job.Actions.RemoveOwnQueues = v, "Remove from Own Queues", "Can remove from own job queues", false) },
				{ "Job.Actions.RemoveOwnAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.RemoveOwnAttachments, (c, v) => c.Job.Actions.RemoveOwnAttachments = v, "Remove Own Attachments", "Can remove own attachments from jobs", false) },
				{ "Job.Actions.RemoveOwnLogs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.RemoveOwnLogs, (c, v) => c.Job.Actions.RemoveOwnLogs = v, "Remove Own Logs", "Can remove own job logs", false) },
				{ "Job.Actions.Reopen", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.Reopen, (c, v) => c.Job.Actions.Reopen = v, "Reopen Jobs", "Can reopen jobs", false) },
				{ "Job.Actions.UpdateSubTypes", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Actions.UpdateSubTypes, (c, v) => c.Job.Actions.UpdateSubTypes = v, "Update Sub Types", "Can update sub types for jobs", false) },
				{ "Job.Properties.WarrantyProperties.ExternalCompletedDate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WarrantyProperties.ExternalCompletedDate, (c, v) => c.Job.Properties.WarrantyProperties.ExternalCompletedDate = v, "External Completed Date Property", "Can update property", false) },
				{ "Job.Properties.WarrantyProperties.ExternalLoggedDate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WarrantyProperties.ExternalLoggedDate, (c, v) => c.Job.Properties.WarrantyProperties.ExternalLoggedDate = v, "External Logged Date Property", "Can update property", false) },
				{ "Job.Properties.WarrantyProperties.ExternalName", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WarrantyProperties.ExternalName, (c, v) => c.Job.Properties.WarrantyProperties.ExternalName = v, "External Name Property", "Can update property", false) },
				{ "Job.Properties.WarrantyProperties.ExternalReference", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WarrantyProperties.ExternalReference, (c, v) => c.Job.Properties.WarrantyProperties.ExternalReference = v, "External Reference Property", "Can update property", false) },
				{ "Job.Properties.WarrantyProperties.ProviderDetails", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WarrantyProperties.ProviderDetails, (c, v) => c.Job.Properties.WarrantyProperties.ProviderDetails = v, "Provider Details", "Can access warranty provider details", false) },
				{ "Job.Properties.WarrantyProperties.WarrantyCompleted", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WarrantyProperties.WarrantyCompleted, (c, v) => c.Job.Properties.WarrantyProperties.WarrantyCompleted = v, "Warranty Completed Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.AccountingChargeAdded", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.AccountingChargeAdded, (c, v) => c.Job.Properties.NonWarrantyProperties.AccountingChargeAdded = v, "Accounting Charge Added Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.AccountingChargePaid", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.AccountingChargePaid, (c, v) => c.Job.Properties.NonWarrantyProperties.AccountingChargePaid = v, "Accounting Charge Paid Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.AccountingChargeRequired", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.AccountingChargeRequired, (c, v) => c.Job.Properties.NonWarrantyProperties.AccountingChargeRequired = v, "Accounting Charge Required Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.AddComponents", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.AddComponents, (c, v) => c.Job.Properties.NonWarrantyProperties.AddComponents = v, "Add Components", "Can add job components (NOTE: Requires Edit Components)", false) },
				{ "Job.Properties.NonWarrantyProperties.EditComponents", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.EditComponents, (c, v) => c.Job.Properties.NonWarrantyProperties.EditComponents = v, "Edit Components", "Can edit and remove job components", false) },
				{ "Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent, (c, v) => c.Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent = v, "Insurance Claim Form Sent Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.InsuranceDetails", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.InsuranceDetails, (c, v) => c.Job.Properties.NonWarrantyProperties.InsuranceDetails = v, "Insurance Detail Properties", "Can update insurance detail properties", false) },
				{ "Job.Properties.NonWarrantyProperties.InvoiceReceived", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.InvoiceReceived, (c, v) => c.Job.Properties.NonWarrantyProperties.InvoiceReceived = v, "Invoice Received Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.IsInsuranceClaim", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.IsInsuranceClaim, (c, v) => c.Job.Properties.NonWarrantyProperties.IsInsuranceClaim = v, "Is Insurance Claim  Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.PurchaseOrderRaised", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.PurchaseOrderRaised, (c, v) => c.Job.Properties.NonWarrantyProperties.PurchaseOrderRaised = v, "Purchase Order Raised Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.PurchaseOrderReference", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.PurchaseOrderReference, (c, v) => c.Job.Properties.NonWarrantyProperties.PurchaseOrderReference = v, "Purchase Order Reference Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.PurchaseOrderSent", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.PurchaseOrderSent, (c, v) => c.Job.Properties.NonWarrantyProperties.PurchaseOrderSent = v, "Purchase Order Sent Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.RepairProviderDetails", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.RepairProviderDetails, (c, v) => c.Job.Properties.NonWarrantyProperties.RepairProviderDetails = v, "Repair Provider Details", "Can access repair provider details", false) },
				{ "Job.Properties.NonWarrantyProperties.RepairerCompletedDate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.RepairerCompletedDate, (c, v) => c.Job.Properties.NonWarrantyProperties.RepairerCompletedDate = v, "Repairer Completed Date Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.RepairerLoggedDate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.RepairerLoggedDate, (c, v) => c.Job.Properties.NonWarrantyProperties.RepairerLoggedDate = v, "Repairer Logged Date Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.RepairerName", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.RepairerName, (c, v) => c.Job.Properties.NonWarrantyProperties.RepairerName = v, "Repairer Name Property", "Can update property", false) },
				{ "Job.Properties.NonWarrantyProperties.RepairerReference", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NonWarrantyProperties.RepairerReference, (c, v) => c.Job.Properties.NonWarrantyProperties.RepairerReference = v, "Repairer Reference Property", "Can update property", false) },
				{ "Job.Properties.JobQueueProperties.EditAnyComments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.JobQueueProperties.EditAnyComments, (c, v) => c.Job.Properties.JobQueueProperties.EditAnyComments = v, "Edit Any Comments", "Can edit any job queue comments", false) },
				{ "Job.Properties.JobQueueProperties.EditAnyPriority", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.JobQueueProperties.EditAnyPriority, (c, v) => c.Job.Properties.JobQueueProperties.EditAnyPriority = v, "Edit Any Priority", "Can edit any job queue Priority", false) },
				{ "Job.Properties.JobQueueProperties.EditAnySLA", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.JobQueueProperties.EditAnySLA, (c, v) => c.Job.Properties.JobQueueProperties.EditAnySLA = v, "Edit Any SLA", "Can edit any job queue SLA", false) },
				{ "Job.Properties.JobQueueProperties.EditOwnComments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.JobQueueProperties.EditOwnComments, (c, v) => c.Job.Properties.JobQueueProperties.EditOwnComments = v, "Edit Own Comments", "Can edit own job queue comments", false) },
				{ "Job.Properties.JobQueueProperties.EditOwnPriority", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.JobQueueProperties.EditOwnPriority, (c, v) => c.Job.Properties.JobQueueProperties.EditOwnPriority = v, "Edit Own Priority", "Can edit own job queue Priority", false) },
				{ "Job.Properties.JobQueueProperties.EditOwnSLA", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.JobQueueProperties.EditOwnSLA, (c, v) => c.Job.Properties.JobQueueProperties.EditOwnSLA = v, "Edit Own SLA", "Can edit own job queue SLA", false) },
				{ "Job.Properties.DeviceHeldLocation", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.DeviceHeldLocation, (c, v) => c.Job.Properties.DeviceHeldLocation = v, "Device Held Location Property", "Can update property", false) },
				{ "Job.Properties.DeviceHeld", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.DeviceHeld, (c, v) => c.Job.Properties.DeviceHeld = v, "Device Held Property", "Can update property", false) },
				{ "Job.Properties.DeviceReadyForReturn", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.DeviceReadyForReturn, (c, v) => c.Job.Properties.DeviceReadyForReturn = v, "Device Ready For Return Property", "Can update property", false) },
				{ "Job.Properties.DeviceReturned", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.DeviceReturned, (c, v) => c.Job.Properties.DeviceReturned = v, "Device Returned Property", "Can update property", false) },
				{ "Job.Properties.ExpectedClosedDate", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.ExpectedClosedDate, (c, v) => c.Job.Properties.ExpectedClosedDate = v, "Expected Closed Date Property", "Can update property", false) },
				{ "Job.Properties.Flags", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.Flags, (c, v) => c.Job.Properties.Flags = v, "Flags Property", "Can update property", false) },
				{ "Job.Properties.NotWaitingForUserAction", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.NotWaitingForUserAction, (c, v) => c.Job.Properties.NotWaitingForUserAction = v, "Not Waiting For User Action Property", "Can update property", false) },
				{ "Job.Properties.WaitingForUserAction", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Properties.WaitingForUserAction, (c, v) => c.Job.Properties.WaitingForUserAction = v, "Waiting For User Action Property", "Can update property", false) },
				{ "Job.Types.CreateHMisc", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateHMisc, (c, v) => c.Job.Types.CreateHMisc = v, "Create Hardware - Miscellaneous Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
				{ "Job.Types.CreateHNWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateHNWar, (c, v) => c.Job.Types.CreateHNWar = v, "Create Hardware - Non-Warranty Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
				{ "Job.Types.CreateHWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateHWar, (c, v) => c.Job.Types.CreateHWar = v, "Create Hardware - Warranty Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
				{ "Job.Types.CreateSApp", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateSApp, (c, v) => c.Job.Types.CreateSApp = v, "Create Software - Application Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
				{ "Job.Types.CreateSOS", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateSOS, (c, v) => c.Job.Types.CreateSOS = v, "Create Software - Operating System Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
				{ "Job.Types.CreateSImg", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateSImg, (c, v) => c.Job.Types.CreateSImg = v, "Create Software - Reimage Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
				{ "Job.Types.CreateUMgmt", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.CreateUMgmt, (c, v) => c.Job.Types.CreateUMgmt = v, "Create User Management Jobs", "Can create jobs of this type (Requires: Create Jobs)", false) },
				{ "Job.Types.ShowHMisc", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowHMisc, (c, v) => c.Job.Types.ShowHMisc = v, "Show Hardware - Miscellaneous Jobs", "Can show jobs of this type", false) },
				{ "Job.Types.ShowHNWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowHNWar, (c, v) => c.Job.Types.ShowHNWar = v, "Show Hardware - Non-Warranty Jobs", "Can show jobs of this type", false) },
				{ "Job.Types.ShowHWar", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowHWar, (c, v) => c.Job.Types.ShowHWar = v, "Show Hardware - Warranty Jobs", "Can show jobs of this type", false) },
				{ "Job.Types.ShowSApp", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowSApp, (c, v) => c.Job.Types.ShowSApp = v, "Show Software - Application Jobs", "Can show jobs of this type", false) },
				{ "Job.Types.ShowSOS", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowSOS, (c, v) => c.Job.Types.ShowSOS = v, "Show Software - Operating System Jobs", "Can show jobs of this type", false) },
				{ "Job.Types.ShowSImg", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowSImg, (c, v) => c.Job.Types.ShowSImg = v, "Show Software - Reimage Jobs", "Can show jobs of this type", false) },
				{ "Job.Types.ShowUMgmt", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Types.ShowUMgmt, (c, v) => c.Job.Types.ShowUMgmt = v, "Show User Management Jobs", "Can show jobs of this type", false) },
				{ "Job.Search", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Search, (c, v) => c.Job.Search = v, "Search Jobs", "Can search jobs", false) },
				{ "Job.ShowAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowAttachments, (c, v) => c.Job.ShowAttachments = v, "Show Attachments", "Can show job attachments", false) },
				{ "Job.ShowDailyChart", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowDailyChart, (c, v) => c.Job.ShowDailyChart = v, "Show Daily Opened & Closed", "Can show daily opened & closed chart", false) },
				{ "Job.ShowFlags", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowFlags, (c, v) => c.Job.ShowFlags = v, "Show Flags", "Can show job flags", false) },
				{ "Job.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.Show, (c, v) => c.Job.Show = v, "Show Jobs", "Can show jobs", false) },
				{ "Job.ShowJobsQueues", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowJobsQueues, (c, v) => c.Job.ShowJobsQueues = v, "Show Jobs Queues", "Can show jobs queues", false) },
				{ "Job.ShowLogs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowLogs, (c, v) => c.Job.ShowLogs = v, "Show Logs", "Can show job logs", false) },
				{ "Job.ShowNonWarrantyComponents", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowNonWarrantyComponents, (c, v) => c.Job.ShowNonWarrantyComponents = v, "Show Non-Warranty Components", "Can show non-warranty job components", false) },
				{ "Job.ShowNonWarrantyFinance", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowNonWarrantyFinance, (c, v) => c.Job.ShowNonWarrantyFinance = v, "Show Non-Warranty Finance", "Can show non-warranty job finance", false) },
				{ "Job.ShowNonWarrantyInsurance", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowNonWarrantyInsurance, (c, v) => c.Job.ShowNonWarrantyInsurance = v, "Show Non-Warranty Insurance", "Can show non-warranty job insurance", false) },
				{ "Job.ShowNonWarrantyRepairs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowNonWarrantyRepairs, (c, v) => c.Job.ShowNonWarrantyRepairs = v, "Show Non-Warranty Repairs", "Can show non-warranty job repairs", false) },
				{ "Job.ShowWarranty", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Job.ShowWarranty, (c, v) => c.Job.ShowWarranty = v, "Show Warranty", "Can show job warranty", false) },
				{ "Device.Properties.AssetNumber", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Properties.AssetNumber, (c, v) => c.Device.Properties.AssetNumber = v, "Asset Number Property", "Can update property", false) },
				{ "Device.Properties.Details", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Properties.Details, (c, v) => c.Device.Properties.Details = v, "Detail Properties", "Can update detail properties", false) },
				{ "Device.Properties.DeviceBatch", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Properties.DeviceBatch, (c, v) => c.Device.Properties.DeviceBatch = v, "Device Batch Property", "Can update property", false) },
				{ "Device.Properties.DeviceProfile", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Properties.DeviceProfile, (c, v) => c.Device.Properties.DeviceProfile = v, "Device Profile Property", "Can update property", false) },
				{ "Device.Properties.Location", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Properties.Location, (c, v) => c.Device.Properties.Location = v, "Location Property", "Can update property", false) },
				{ "Device.Actions.AddAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.AddAttachments, (c, v) => c.Device.Actions.AddAttachments = v, "Add Attachments", "Can add attachments to devices", false) },
				{ "Device.Actions.AllowUnauthenticatedEnrol", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.AllowUnauthenticatedEnrol, (c, v) => c.Device.Actions.AllowUnauthenticatedEnrol = v, "Allow Unauthenticated Enrol", "Can allow devices to enrol without authentication", false) },
				{ "Device.Actions.AssignUser", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.AssignUser, (c, v) => c.Device.Actions.AssignUser = v, "Assign User", "Can update the user assignment of devices", false) },
				{ "Device.Actions.Decommission", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.Decommission, (c, v) => c.Device.Actions.Decommission = v, "Decommission", "Can decommission devices", false) },
				{ "Device.Actions.Delete", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.Delete, (c, v) => c.Device.Actions.Delete = v, "Delete", "Can delete devices", false) },
				{ "Device.Actions.EnrolDevices", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.EnrolDevices, (c, v) => c.Device.Actions.EnrolDevices = v, "Enrol Devices", "Can add devices offline and enrol devices with the Bootstrapper", false) },
				{ "Device.Actions.Export", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.Export, (c, v) => c.Device.Actions.Export = v, "Export Devices", "Can export devices in a bulk format", false) },
				{ "Device.Actions.GenerateDocuments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.GenerateDocuments, (c, v) => c.Device.Actions.GenerateDocuments = v, "Generate Documents", "Can generate documents for jobs", false) },
				{ "Device.Actions.Import", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.Import, (c, v) => c.Device.Actions.Import = v, "Import Devices", "Can bulk import devices", false) },
				{ "Device.Actions.Recommission", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.Recommission, (c, v) => c.Device.Actions.Recommission = v, "Recommission", "Can recommission devices", false) },
				{ "Device.Actions.RemoveAnyAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.RemoveAnyAttachments, (c, v) => c.Device.Actions.RemoveAnyAttachments = v, "Remove Any Attachments", "Can remove any attachments from devices", false) },
				{ "Device.Actions.RemoveOwnAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Actions.RemoveOwnAttachments, (c, v) => c.Device.Actions.RemoveOwnAttachments = v, "Remove Own Attachments", "Can remove own attachments from devices", false) },
				{ "Device.Search", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Search, (c, v) => c.Device.Search = v, "Search Devices", "Can search devices", false) },
				{ "Device.ShowAssignmentHistory", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.ShowAssignmentHistory, (c, v) => c.Device.ShowAssignmentHistory = v, "Show Assignment History", "Can show the assignment history for devices", false) },
				{ "Device.ShowAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.ShowAttachments, (c, v) => c.Device.ShowAttachments = v, "Show Attachments", "Can show device attachments", false) },
				{ "Device.ShowCertificates", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.ShowCertificates, (c, v) => c.Device.ShowCertificates = v, "Show Certificates", "Can show certificates associated with devices", false) },
				{ "Device.ShowDetails", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.ShowDetails, (c, v) => c.Device.ShowDetails = v, "Show Details", "Can show details associated with devices", false) },
				{ "Device.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.Show, (c, v) => c.Device.Show = v, "Show Devices", "Can show devices", false) },
				{ "Device.ShowJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.Device.ShowJobs, (c, v) => c.Device.ShowJobs = v, "Show Devices Jobs", "Can show jobs associated with devices", false) },
				{ "User.Actions.AddAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Actions.AddAttachments, (c, v) => c.User.Actions.AddAttachments = v, "Add Attachments", "Can add attachments to users", false) },
				{ "User.Actions.AddFlags", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Actions.AddFlags, (c, v) => c.User.Actions.AddFlags = v, "Add User Flags", "Can add user flags", false) },
				{ "User.Actions.EditFlags", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Actions.EditFlags, (c, v) => c.User.Actions.EditFlags = v, "Edit User Flags", "Can edit user flags", false) },
				{ "User.Actions.GenerateDocuments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Actions.GenerateDocuments, (c, v) => c.User.Actions.GenerateDocuments = v, "Generate Documents", "Can generate documents for users", false) },
				{ "User.Actions.RemoveAnyAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Actions.RemoveAnyAttachments, (c, v) => c.User.Actions.RemoveAnyAttachments = v, "Remove Any Attachments", "Can remove any attachments from users", false) },
				{ "User.Actions.RemoveOwnAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Actions.RemoveOwnAttachments, (c, v) => c.User.Actions.RemoveOwnAttachments = v, "Remove Own Attachments", "Can remove own attachments from users", false) },
				{ "User.Actions.RemoveFlags", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Actions.RemoveFlags, (c, v) => c.User.Actions.RemoveFlags = v, "Remove User Flags", "Can remove user flags", false) },
				{ "User.Search", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Search, (c, v) => c.User.Search = v, "Search Users", "Can search users", false) },
				{ "User.ShowAttachments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAttachments, (c, v) => c.User.ShowAttachments = v, "Show Attachments", "Can show user attachments", false) },
				{ "User.ShowAssignmentHistory", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAssignmentHistory, (c, v) => c.User.ShowAssignmentHistory = v, "Show Device Assignment History", "Can show the device assignment history for users", false) },
				{ "User.ShowAssignments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAssignments, (c, v) => c.User.ShowAssignments = v, "Show Device Assignments", "Can show the current device assignments users", false) },
				{ "User.Show", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.Show, (c, v) => c.User.Show = v, "Show Users", "Can show users", false) },
				{ "User.ShowAuthorization", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowAuthorization, (c, v) => c.User.ShowAuthorization = v, "Show Users Authorization", "Can show authorization permissions associated with users", false) },
				{ "User.ShowDetails", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowDetails, (c, v) => c.User.ShowDetails = v, "Show Users Details", "Can show users contact and personal details", false) },
				{ "User.ShowFlagAssignments", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowFlagAssignments, (c, v) => c.User.ShowFlagAssignments = v, "Show Users Flag Assignments", "Can show flags associated with users", false) },
				{ "User.ShowJobs", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.User.ShowJobs, (c, v) => c.User.ShowJobs = v, "Show Users Jobs", "Can show jobs associated with users", false) },
				{ "ComputerAccount", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.ComputerAccount, (c, v) => c.ComputerAccount = v, "Computer Account", "Represents a computer account", true) },
				{ "DiscoAdminAccount", new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(c => c.DiscoAdminAccount, (c, v) => c.DiscoAdminAccount = v, "Disco Administrator Account", "Represents a Disco Administrator account", true) }
			};
#endregion

#region Role Claim Navigator
			_claimNavigator =
				new ClaimNavigatorItem("Claims", "Permissions", "Top-level node for all permissions", false, new List<IClaimNavigatorItem>() {
				    new ClaimNavigatorItem("Config", "Configuration", "Permissions related to Disco Configuration", false, new List<IClaimNavigatorItem>() {
				        new ClaimNavigatorItem("Config.DeviceBatch", "Device Batches", "Permissions related to Device Batches", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.DeviceBatch.Configure", false),
				            new ClaimNavigatorItem("Config.DeviceBatch.Create", false),
				            new ClaimNavigatorItem("Config.DeviceBatch.Delete", false),
				            new ClaimNavigatorItem("Config.DeviceBatch.Show", false),
				            new ClaimNavigatorItem("Config.DeviceBatch.ShowTimeline", false)
				        }),
				        new ClaimNavigatorItem("Config.DeviceCertificate", "Device Certificates", "Permissions related to Device Certificates", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.DeviceCertificate.DownloadCertificates", false)
				        }),
				        new ClaimNavigatorItem("Config.DeviceModel", "Device Models", "Permissions related to Device Models", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.DeviceModel.ConfigureComponents", false),
				            new ClaimNavigatorItem("Config.DeviceModel.Configure", false),
				            new ClaimNavigatorItem("Config.DeviceModel.Delete", false),
				            new ClaimNavigatorItem("Config.DeviceModel.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.DeviceProfile", "Device Profiles", "Permissions related to Device Profiles", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.DeviceProfile.ConfigureComputerNameTemplate", false),
				            new ClaimNavigatorItem("Config.DeviceProfile.ConfigureDefaults", false),
				            new ClaimNavigatorItem("Config.DeviceProfile.Configure", false),
				            new ClaimNavigatorItem("Config.DeviceProfile.Create", false),
				            new ClaimNavigatorItem("Config.DeviceProfile.Delete", false),
				            new ClaimNavigatorItem("Config.DeviceProfile.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.DocumentTemplate", "Document Templates", "Permissions related to Document Templates", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.DocumentTemplate.BulkGenerate", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.Configure", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.ConfigureFilterExpression", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.Create", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.Delete", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.UndetectedPages", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.ShowStatus", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.Show", false),
				            new ClaimNavigatorItem("Config.DocumentTemplate.Upload", false)
				        }),
				        new ClaimNavigatorItem("Config.Enrolment", "Enrolment", "Permissions related to Device Enrolment", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.Enrolment.Configure", false),
				            new ClaimNavigatorItem("Config.Enrolment.DownloadBootstrapper", false),
				            new ClaimNavigatorItem("Config.Enrolment.Show", false),
				            new ClaimNavigatorItem("Config.Enrolment.ShowStatus", false)
				        }),
				        new ClaimNavigatorItem("Config.JobPreferences", "Job Preferences", "Permissions related to Job Preferences", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.JobPreferences.Configure", false),
				            new ClaimNavigatorItem("Config.JobPreferences.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.JobQueue", "Job Queues", "Permissions related to Job Queues", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.JobQueue.Configure", false),
				            new ClaimNavigatorItem("Config.JobQueue.Create", false),
				            new ClaimNavigatorItem("Config.JobQueue.Delete", false),
				            new ClaimNavigatorItem("Config.JobQueue.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.Logging", "Logging", "Permissions related to Logging", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.Logging.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.Organisation", "Organisation Details", "Permissions related to the Organisation Details", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.Organisation.ConfigureAddresses", false),
				            new ClaimNavigatorItem("Config.Organisation.ConfigureLogo", false),
				            new ClaimNavigatorItem("Config.Organisation.ConfigureMultiSiteMode", false),
				            new ClaimNavigatorItem("Config.Organisation.ConfigureName", false),
				            new ClaimNavigatorItem("Config.Organisation.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.Plugin", "Plugin", "Permissions related to Plugins", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.Plugin.Configure", false),
				            new ClaimNavigatorItem("Config.Plugin.InstallLocal", false),
				            new ClaimNavigatorItem("Config.Plugin.Install", false),
				            new ClaimNavigatorItem("Config.Plugin.Show", false),
				            new ClaimNavigatorItem("Config.Plugin.Uninstall", false)
				        }),
				        new ClaimNavigatorItem("Config.System", "System", "Permissions related to System Configuration", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.System.ConfigureActiveDirectory", false),
				            new ClaimNavigatorItem("Config.System.ConfigureProxy", false),
				            new ClaimNavigatorItem("Config.System.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.UserFlag", "User Flags", "Permissions related to User Flags", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Config.UserFlag.Configure", false),
				            new ClaimNavigatorItem("Config.UserFlag.Create", false),
				            new ClaimNavigatorItem("Config.UserFlag.Delete", false),
				            new ClaimNavigatorItem("Config.UserFlag.Show", false)
				        }),
				        new ClaimNavigatorItem("Config.Show", false)
				    }),
				    new ClaimNavigatorItem("Job", "Job", "Permissions related to Jobs", false, new List<IClaimNavigatorItem>() {
				        new ClaimNavigatorItem("Job.Actions", "Actions", "Permissions related to Job Actions", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Job.Actions.AddAttachments", false),
				            new ClaimNavigatorItem("Job.Actions.AddLogs", false),
				            new ClaimNavigatorItem("Job.Actions.AddAnyQueues", false),
				            new ClaimNavigatorItem("Job.Actions.AddOwnQueues", false),
				            new ClaimNavigatorItem("Job.Actions.Close", false),
				            new ClaimNavigatorItem("Job.Actions.ConvertHWarToHNWar", false),
				            new ClaimNavigatorItem("Job.Actions.Create", false),
				            new ClaimNavigatorItem("Job.Actions.Delete", false),
				            new ClaimNavigatorItem("Job.Actions.ForceClose", false),
				            new ClaimNavigatorItem("Job.Actions.GenerateDocuments", false),
				            new ClaimNavigatorItem("Job.Actions.LogRepair", false),
				            new ClaimNavigatorItem("Job.Actions.LogWarranty", false),
				            new ClaimNavigatorItem("Job.Actions.RemoveAnyAttachments", false),
				            new ClaimNavigatorItem("Job.Actions.RemoveAnyLogs", false),
				            new ClaimNavigatorItem("Job.Actions.RemoveAnyQueues", false),
				            new ClaimNavigatorItem("Job.Actions.RemoveOwnQueues", false),
				            new ClaimNavigatorItem("Job.Actions.RemoveOwnAttachments", false),
				            new ClaimNavigatorItem("Job.Actions.RemoveOwnLogs", false),
				            new ClaimNavigatorItem("Job.Actions.Reopen", false),
				            new ClaimNavigatorItem("Job.Actions.UpdateSubTypes", false)
				        }),
				        new ClaimNavigatorItem("Job.Properties", "Job Properties", "Permissions related to Job Properties", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Job.Properties.JobQueueProperties", "Job Queue Properties", "Permissions related to Job Queue Job Properties", false, new List<IClaimNavigatorItem>() {
				                new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditAnyComments", false),
				                new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditAnyPriority", false),
				                new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditAnySLA", false),
				                new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditOwnComments", false),
				                new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditOwnPriority", false),
				                new ClaimNavigatorItem("Job.Properties.JobQueueProperties.EditOwnSLA", false)
				            }),
				            new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties", "Non Warranty Properties", "Permissions related to Non-Warranty Job Properties", false, new List<IClaimNavigatorItem>() {
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.AccountingChargeAdded", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.AccountingChargePaid", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.AccountingChargeRequired", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.AddComponents", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.EditComponents", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.InsuranceDetails", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.InvoiceReceived", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.IsInsuranceClaim", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.PurchaseOrderRaised", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.PurchaseOrderReference", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.PurchaseOrderSent", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.RepairProviderDetails", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.RepairerCompletedDate", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.RepairerLoggedDate", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.RepairerName", false),
				                new ClaimNavigatorItem("Job.Properties.NonWarrantyProperties.RepairerReference", false)
				            }),
				            new ClaimNavigatorItem("Job.Properties.WarrantyProperties", "Warranty Properties", "Permissions related to Warranty Job Properties", false, new List<IClaimNavigatorItem>() {
				                new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ExternalCompletedDate", false),
				                new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ExternalLoggedDate", false),
				                new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ExternalName", false),
				                new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ExternalReference", false),
				                new ClaimNavigatorItem("Job.Properties.WarrantyProperties.ProviderDetails", false),
				                new ClaimNavigatorItem("Job.Properties.WarrantyProperties.WarrantyCompleted", false)
				            }),
				            new ClaimNavigatorItem("Job.Properties.DeviceHeldLocation", false),
				            new ClaimNavigatorItem("Job.Properties.DeviceHeld", false),
				            new ClaimNavigatorItem("Job.Properties.DeviceReadyForReturn", false),
				            new ClaimNavigatorItem("Job.Properties.DeviceReturned", false),
				            new ClaimNavigatorItem("Job.Properties.ExpectedClosedDate", false),
				            new ClaimNavigatorItem("Job.Properties.Flags", false),
				            new ClaimNavigatorItem("Job.Properties.NotWaitingForUserAction", false),
				            new ClaimNavigatorItem("Job.Properties.WaitingForUserAction", false)
				        }),
				        new ClaimNavigatorItem("Job.Lists", "Lists", "Permissions related to Job Lists", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Job.Lists.AllOpen", false),
				            new ClaimNavigatorItem("Job.Lists.AwaitingFinanceAgreementBreach", false),
				            new ClaimNavigatorItem("Job.Lists.AwaitingFinanceCharge", false),
				            new ClaimNavigatorItem("Job.Lists.AwaitingFinanceInsuranceProcessing", false),
				            new ClaimNavigatorItem("Job.Lists.AwaitingFinance", false),
				            new ClaimNavigatorItem("Job.Lists.AwaitingFinancePayment", false),
				            new ClaimNavigatorItem("Job.Lists.AwaitingTechnicianAction", false),
				            new ClaimNavigatorItem("Job.Lists.AwaitingUserAction", false),
				            new ClaimNavigatorItem("Job.Lists.DevicesAwaitingRepair", false),
				            new ClaimNavigatorItem("Job.Lists.DevicesReadyForReturn", false),
				            new ClaimNavigatorItem("Job.Lists.JobQueueLists", false),
				            new ClaimNavigatorItem("Job.Lists.Locations", false),
				            new ClaimNavigatorItem("Job.Lists.LongRunningJobs", false),
				            new ClaimNavigatorItem("Job.Lists.MyJobs", false),
				            new ClaimNavigatorItem("Job.Lists.MyJobsOrphaned", false),
				            new ClaimNavigatorItem("Job.Lists.RecentlyClosed", false),
				            new ClaimNavigatorItem("Job.Lists.StaleJobs", false)
				        }),
				        new ClaimNavigatorItem("Job.Types", "Types", "Permissions related to Job Types", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Job.Types.CreateHMisc", false),
				            new ClaimNavigatorItem("Job.Types.CreateHNWar", false),
				            new ClaimNavigatorItem("Job.Types.CreateHWar", false),
				            new ClaimNavigatorItem("Job.Types.CreateSApp", false),
				            new ClaimNavigatorItem("Job.Types.CreateSOS", false),
				            new ClaimNavigatorItem("Job.Types.CreateSImg", false),
				            new ClaimNavigatorItem("Job.Types.CreateUMgmt", false),
				            new ClaimNavigatorItem("Job.Types.ShowHMisc", false),
				            new ClaimNavigatorItem("Job.Types.ShowHNWar", false),
				            new ClaimNavigatorItem("Job.Types.ShowHWar", false),
				            new ClaimNavigatorItem("Job.Types.ShowSApp", false),
				            new ClaimNavigatorItem("Job.Types.ShowSOS", false),
				            new ClaimNavigatorItem("Job.Types.ShowSImg", false),
				            new ClaimNavigatorItem("Job.Types.ShowUMgmt", false)
				        }),
				        new ClaimNavigatorItem("Job.Search", false),
				        new ClaimNavigatorItem("Job.ShowAttachments", false),
				        new ClaimNavigatorItem("Job.ShowDailyChart", false),
				        new ClaimNavigatorItem("Job.ShowFlags", false),
				        new ClaimNavigatorItem("Job.Show", false),
				        new ClaimNavigatorItem("Job.ShowJobsQueues", false),
				        new ClaimNavigatorItem("Job.ShowLogs", false),
				        new ClaimNavigatorItem("Job.ShowNonWarrantyComponents", false),
				        new ClaimNavigatorItem("Job.ShowNonWarrantyFinance", false),
				        new ClaimNavigatorItem("Job.ShowNonWarrantyInsurance", false),
				        new ClaimNavigatorItem("Job.ShowNonWarrantyRepairs", false),
				        new ClaimNavigatorItem("Job.ShowWarranty", false)
				    }),
				    new ClaimNavigatorItem("Device", "Device", "Permissions related to Devices", false, new List<IClaimNavigatorItem>() {
				        new ClaimNavigatorItem("Device.Actions", "Actions", "Permissions related to Device Actions", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Device.Actions.AddAttachments", false),
				            new ClaimNavigatorItem("Device.Actions.AllowUnauthenticatedEnrol", false),
				            new ClaimNavigatorItem("Device.Actions.AssignUser", false),
				            new ClaimNavigatorItem("Device.Actions.Decommission", false),
				            new ClaimNavigatorItem("Device.Actions.Delete", false),
				            new ClaimNavigatorItem("Device.Actions.EnrolDevices", false),
				            new ClaimNavigatorItem("Device.Actions.Export", false),
				            new ClaimNavigatorItem("Device.Actions.GenerateDocuments", false),
				            new ClaimNavigatorItem("Device.Actions.Import", false),
				            new ClaimNavigatorItem("Device.Actions.Recommission", false),
				            new ClaimNavigatorItem("Device.Actions.RemoveAnyAttachments", false),
				            new ClaimNavigatorItem("Device.Actions.RemoveOwnAttachments", false)
				        }),
				        new ClaimNavigatorItem("Device.Properties", "Device Properties", "Permissions related to Device Properties", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("Device.Properties.AssetNumber", false),
				            new ClaimNavigatorItem("Device.Properties.Details", false),
				            new ClaimNavigatorItem("Device.Properties.DeviceBatch", false),
				            new ClaimNavigatorItem("Device.Properties.DeviceProfile", false),
				            new ClaimNavigatorItem("Device.Properties.Location", false)
				        }),
				        new ClaimNavigatorItem("Device.Search", false),
				        new ClaimNavigatorItem("Device.ShowAssignmentHistory", false),
				        new ClaimNavigatorItem("Device.ShowAttachments", false),
				        new ClaimNavigatorItem("Device.ShowCertificates", false),
				        new ClaimNavigatorItem("Device.ShowDetails", false),
				        new ClaimNavigatorItem("Device.Show", false),
				        new ClaimNavigatorItem("Device.ShowJobs", false)
				    }),
				    new ClaimNavigatorItem("User", "User", "Permissions related to Users", false, new List<IClaimNavigatorItem>() {
				        new ClaimNavigatorItem("User.Actions", "Actions", "Permissions related to User Actions", false, new List<IClaimNavigatorItem>() {
				            new ClaimNavigatorItem("User.Actions.AddAttachments", false),
				            new ClaimNavigatorItem("User.Actions.AddFlags", false),
				            new ClaimNavigatorItem("User.Actions.EditFlags", false),
				            new ClaimNavigatorItem("User.Actions.GenerateDocuments", false),
				            new ClaimNavigatorItem("User.Actions.RemoveAnyAttachments", false),
				            new ClaimNavigatorItem("User.Actions.RemoveOwnAttachments", false),
				            new ClaimNavigatorItem("User.Actions.RemoveFlags", false)
				        }),
				        new ClaimNavigatorItem("User.Search", false),
				        new ClaimNavigatorItem("User.ShowAttachments", false),
				        new ClaimNavigatorItem("User.ShowAssignmentHistory", false),
				        new ClaimNavigatorItem("User.ShowAssignments", false),
				        new ClaimNavigatorItem("User.Show", false),
				        new ClaimNavigatorItem("User.ShowAuthorization", false),
				        new ClaimNavigatorItem("User.ShowDetails", false),
				        new ClaimNavigatorItem("User.ShowFlagAssignments", false),
				        new ClaimNavigatorItem("User.ShowJobs", false)
				    }),
				    new ClaimNavigatorItem("ComputerAccount", true),
				    new ClaimNavigatorItem("DiscoAdminAccount", true)
				});
#endregion
        }

		public static ClaimNavigatorItem RoleClaimNavigator
		{
			get { return _claimNavigator; }
		}

		internal static Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool> GetClaimDefinition(string ClaimKey) {
			Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool> claimDef;

            if (!_roleClaims.TryGetValue(ClaimKey, out claimDef))
                throw new ArgumentException("Unknown Claim Key", "ClaimKey");

            return new Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool>(claimDef.Item1, claimDef.Item2, claimDef.Item3, claimDef.Item4, claimDef.Item5);
		}

		public static Func<RoleClaims, bool> GetClaimAccessor(string ClaimKey) {
			Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool> claimDef;

            if (!_roleClaims.TryGetValue(ClaimKey, out claimDef))
                throw new ArgumentException("Unknown Claim Key", "ClaimKey");

            return claimDef.Item1;
		}

		public static Action<RoleClaims, bool> GetClaimSetter(string ClaimKey) {
			Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool> claimDef;

            if (!_roleClaims.TryGetValue(ClaimKey, out claimDef))
                throw new ArgumentException("Unknown Claim Key", "ClaimKey");

            return claimDef.Item2;
		}

		public static Tuple<string, string, bool> GetClaimDetails(string ClaimKey) {
			Tuple<Func<RoleClaims, bool>, Action<RoleClaims, bool>, string, string, bool> claimDef;

            if (!_roleClaims.TryGetValue(ClaimKey, out claimDef))
                throw new ArgumentException("Unknown Claim Key", "ClaimKey");

            return new Tuple<string, string, bool>(claimDef.Item3, claimDef.Item4, claimDef.Item5);
		}

		public static RoleClaims BuildClaims(IEnumerable<string> ClaimKeys){
			var c = new RoleClaims();
			foreach (var claimKey in ClaimKeys)
				c.Set(claimKey, true);

			return c;
		}

		public static List<string> GetClaimKeys(RoleClaims Claims)
        {
            var claims = Claims;
            return _roleClaims.Where(rc => rc.Value.Item1(claims)).Select(rc => rc.Key).ToList();
        }

		public static RoleClaims AdministratorClaims() {
			var c = new RoleClaims();
#region Set All Administrator Claims
			c.Config.DeviceCertificate.DownloadCertificates = true;
			c.Config.Enrolment.Configure = true;
			c.Config.Enrolment.DownloadBootstrapper = true;
			c.Config.Enrolment.Show = true;
			c.Config.Enrolment.ShowStatus = true;
			c.Config.DeviceBatch.Configure = true;
			c.Config.DeviceBatch.Create = true;
			c.Config.DeviceBatch.Delete = true;
			c.Config.DeviceBatch.Show = true;
			c.Config.DeviceBatch.ShowTimeline = true;
			c.Config.DeviceModel.ConfigureComponents = true;
			c.Config.DeviceModel.Configure = true;
			c.Config.DeviceModel.Delete = true;
			c.Config.DeviceModel.Show = true;
			c.Config.DeviceProfile.ConfigureComputerNameTemplate = true;
			c.Config.DeviceProfile.ConfigureDefaults = true;
			c.Config.DeviceProfile.Configure = true;
			c.Config.DeviceProfile.Create = true;
			c.Config.DeviceProfile.Delete = true;
			c.Config.DeviceProfile.Show = true;
			c.Config.DocumentTemplate.BulkGenerate = true;
			c.Config.DocumentTemplate.Configure = true;
			c.Config.DocumentTemplate.ConfigureFilterExpression = true;
			c.Config.DocumentTemplate.Create = true;
			c.Config.DocumentTemplate.Delete = true;
			c.Config.DocumentTemplate.UndetectedPages = true;
			c.Config.DocumentTemplate.ShowStatus = true;
			c.Config.DocumentTemplate.Show = true;
			c.Config.DocumentTemplate.Upload = true;
			c.Config.Logging.Show = true;
			c.Config.Plugin.Configure = true;
			c.Config.Plugin.InstallLocal = true;
			c.Config.Plugin.Install = true;
			c.Config.Plugin.Show = true;
			c.Config.Plugin.Uninstall = true;
			c.Config.System.ConfigureActiveDirectory = true;
			c.Config.System.ConfigureProxy = true;
			c.Config.System.Show = true;
			c.Config.Organisation.ConfigureAddresses = true;
			c.Config.Organisation.ConfigureLogo = true;
			c.Config.Organisation.ConfigureMultiSiteMode = true;
			c.Config.Organisation.ConfigureName = true;
			c.Config.Organisation.Show = true;
			c.Config.JobPreferences.Configure = true;
			c.Config.JobPreferences.Show = true;
			c.Config.JobQueue.Configure = true;
			c.Config.JobQueue.Create = true;
			c.Config.JobQueue.Delete = true;
			c.Config.JobQueue.Show = true;
			c.Config.UserFlag.Configure = true;
			c.Config.UserFlag.Create = true;
			c.Config.UserFlag.Delete = true;
			c.Config.UserFlag.Show = true;
			c.Config.Show = true;
			c.Job.Lists.AllOpen = true;
			c.Job.Lists.AwaitingFinanceAgreementBreach = true;
			c.Job.Lists.AwaitingFinanceCharge = true;
			c.Job.Lists.AwaitingFinanceInsuranceProcessing = true;
			c.Job.Lists.AwaitingFinance = true;
			c.Job.Lists.AwaitingFinancePayment = true;
			c.Job.Lists.AwaitingTechnicianAction = true;
			c.Job.Lists.AwaitingUserAction = true;
			c.Job.Lists.DevicesAwaitingRepair = true;
			c.Job.Lists.DevicesReadyForReturn = true;
			c.Job.Lists.JobQueueLists = true;
			c.Job.Lists.Locations = true;
			c.Job.Lists.LongRunningJobs = true;
			c.Job.Lists.MyJobs = true;
			c.Job.Lists.MyJobsOrphaned = true;
			c.Job.Lists.RecentlyClosed = true;
			c.Job.Lists.StaleJobs = true;
			c.Job.Actions.AddAttachments = true;
			c.Job.Actions.AddLogs = true;
			c.Job.Actions.AddAnyQueues = true;
			c.Job.Actions.AddOwnQueues = true;
			c.Job.Actions.Close = true;
			c.Job.Actions.ConvertHWarToHNWar = true;
			c.Job.Actions.Create = true;
			c.Job.Actions.Delete = true;
			c.Job.Actions.ForceClose = true;
			c.Job.Actions.GenerateDocuments = true;
			c.Job.Actions.LogRepair = true;
			c.Job.Actions.LogWarranty = true;
			c.Job.Actions.RemoveAnyAttachments = true;
			c.Job.Actions.RemoveAnyLogs = true;
			c.Job.Actions.RemoveAnyQueues = true;
			c.Job.Actions.RemoveOwnQueues = true;
			c.Job.Actions.RemoveOwnAttachments = true;
			c.Job.Actions.RemoveOwnLogs = true;
			c.Job.Actions.Reopen = true;
			c.Job.Actions.UpdateSubTypes = true;
			c.Job.Properties.WarrantyProperties.ExternalCompletedDate = true;
			c.Job.Properties.WarrantyProperties.ExternalLoggedDate = true;
			c.Job.Properties.WarrantyProperties.ExternalName = true;
			c.Job.Properties.WarrantyProperties.ExternalReference = true;
			c.Job.Properties.WarrantyProperties.ProviderDetails = true;
			c.Job.Properties.WarrantyProperties.WarrantyCompleted = true;
			c.Job.Properties.NonWarrantyProperties.AccountingChargeAdded = true;
			c.Job.Properties.NonWarrantyProperties.AccountingChargePaid = true;
			c.Job.Properties.NonWarrantyProperties.AccountingChargeRequired = true;
			c.Job.Properties.NonWarrantyProperties.AddComponents = true;
			c.Job.Properties.NonWarrantyProperties.EditComponents = true;
			c.Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent = true;
			c.Job.Properties.NonWarrantyProperties.InsuranceDetails = true;
			c.Job.Properties.NonWarrantyProperties.InvoiceReceived = true;
			c.Job.Properties.NonWarrantyProperties.IsInsuranceClaim = true;
			c.Job.Properties.NonWarrantyProperties.PurchaseOrderRaised = true;
			c.Job.Properties.NonWarrantyProperties.PurchaseOrderReference = true;
			c.Job.Properties.NonWarrantyProperties.PurchaseOrderSent = true;
			c.Job.Properties.NonWarrantyProperties.RepairProviderDetails = true;
			c.Job.Properties.NonWarrantyProperties.RepairerCompletedDate = true;
			c.Job.Properties.NonWarrantyProperties.RepairerLoggedDate = true;
			c.Job.Properties.NonWarrantyProperties.RepairerName = true;
			c.Job.Properties.NonWarrantyProperties.RepairerReference = true;
			c.Job.Properties.JobQueueProperties.EditAnyComments = true;
			c.Job.Properties.JobQueueProperties.EditAnyPriority = true;
			c.Job.Properties.JobQueueProperties.EditAnySLA = true;
			c.Job.Properties.JobQueueProperties.EditOwnComments = true;
			c.Job.Properties.JobQueueProperties.EditOwnPriority = true;
			c.Job.Properties.JobQueueProperties.EditOwnSLA = true;
			c.Job.Properties.DeviceHeldLocation = true;
			c.Job.Properties.DeviceHeld = true;
			c.Job.Properties.DeviceReadyForReturn = true;
			c.Job.Properties.DeviceReturned = true;
			c.Job.Properties.ExpectedClosedDate = true;
			c.Job.Properties.Flags = true;
			c.Job.Properties.NotWaitingForUserAction = true;
			c.Job.Properties.WaitingForUserAction = true;
			c.Job.Types.CreateHMisc = true;
			c.Job.Types.CreateHNWar = true;
			c.Job.Types.CreateHWar = true;
			c.Job.Types.CreateSApp = true;
			c.Job.Types.CreateSOS = true;
			c.Job.Types.CreateSImg = true;
			c.Job.Types.CreateUMgmt = true;
			c.Job.Types.ShowHMisc = true;
			c.Job.Types.ShowHNWar = true;
			c.Job.Types.ShowHWar = true;
			c.Job.Types.ShowSApp = true;
			c.Job.Types.ShowSOS = true;
			c.Job.Types.ShowSImg = true;
			c.Job.Types.ShowUMgmt = true;
			c.Job.Search = true;
			c.Job.ShowAttachments = true;
			c.Job.ShowDailyChart = true;
			c.Job.ShowFlags = true;
			c.Job.Show = true;
			c.Job.ShowJobsQueues = true;
			c.Job.ShowLogs = true;
			c.Job.ShowNonWarrantyComponents = true;
			c.Job.ShowNonWarrantyFinance = true;
			c.Job.ShowNonWarrantyInsurance = true;
			c.Job.ShowNonWarrantyRepairs = true;
			c.Job.ShowWarranty = true;
			c.Device.Properties.AssetNumber = true;
			c.Device.Properties.Details = true;
			c.Device.Properties.DeviceBatch = true;
			c.Device.Properties.DeviceProfile = true;
			c.Device.Properties.Location = true;
			c.Device.Actions.AddAttachments = true;
			c.Device.Actions.AllowUnauthenticatedEnrol = true;
			c.Device.Actions.AssignUser = true;
			c.Device.Actions.Decommission = true;
			c.Device.Actions.Delete = true;
			c.Device.Actions.EnrolDevices = true;
			c.Device.Actions.Export = true;
			c.Device.Actions.GenerateDocuments = true;
			c.Device.Actions.Import = true;
			c.Device.Actions.Recommission = true;
			c.Device.Actions.RemoveAnyAttachments = true;
			c.Device.Actions.RemoveOwnAttachments = true;
			c.Device.Search = true;
			c.Device.ShowAssignmentHistory = true;
			c.Device.ShowAttachments = true;
			c.Device.ShowCertificates = true;
			c.Device.ShowDetails = true;
			c.Device.Show = true;
			c.Device.ShowJobs = true;
			c.User.Actions.AddAttachments = true;
			c.User.Actions.AddFlags = true;
			c.User.Actions.EditFlags = true;
			c.User.Actions.GenerateDocuments = true;
			c.User.Actions.RemoveAnyAttachments = true;
			c.User.Actions.RemoveOwnAttachments = true;
			c.User.Actions.RemoveFlags = true;
			c.User.Search = true;
			c.User.ShowAttachments = true;
			c.User.ShowAssignmentHistory = true;
			c.User.ShowAssignments = true;
			c.User.Show = true;
			c.User.ShowAuthorization = true;
			c.User.ShowDetails = true;
			c.User.ShowFlagAssignments = true;
			c.User.ShowJobs = true;
			c.DiscoAdminAccount = true;
#endregion
			return c;
		}

		public static RoleClaims ComputerAccountClaims() {
			return new RoleClaims() {
				ComputerAccount = true
			};
		}

#region Role Claim Constants

        /// <summary>Configuration
        /// <para>Permissions related to Disco Configuration</para>
        /// </summary>
        public static class Config
        {

            /// <summary>Device Certificates
            /// <para>Permissions related to Device Certificates</para>
            /// </summary>
            public static class DeviceCertificate
            {

                /// <summary>Download Certificates
                /// <para>Can download certificates</para>
                /// </summary>
                public const string DownloadCertificates = "Config.DeviceCertificate.DownloadCertificates";
            }

            /// <summary>Enrolment
            /// <para>Permissions related to Device Enrolment</para>
            /// </summary>
            public static class Enrolment
            {

                /// <summary>Configure Enrolment
                /// <para>Can configure device enrolment</para>
                /// </summary>
                public const string Configure = "Config.Enrolment.Configure";

                /// <summary>Download Bootstrapper
                /// <para>Can download the Device Bootstrapper</para>
                /// </summary>
                public const string DownloadBootstrapper = "Config.Enrolment.DownloadBootstrapper";

                /// <summary>Show Enrolment
                /// <para>Can show device enrolment</para>
                /// </summary>
                public const string Show = "Config.Enrolment.Show";

                /// <summary>Show Enrolment Status
                /// <para>Can show the enrolment status</para>
                /// </summary>
                public const string ShowStatus = "Config.Enrolment.ShowStatus";
            }

            /// <summary>Device Batches
            /// <para>Permissions related to Device Batches</para>
            /// </summary>
            public static class DeviceBatch
            {

                /// <summary>Configure Device Batches
                /// <para>Can configure device batches</para>
                /// </summary>
                public const string Configure = "Config.DeviceBatch.Configure";

                /// <summary>Create Device Batches
                /// <para>Can create device batches</para>
                /// </summary>
                public const string Create = "Config.DeviceBatch.Create";

                /// <summary>Delete Device Batches
                /// <para>Can delete device batches</para>
                /// </summary>
                public const string Delete = "Config.DeviceBatch.Delete";

                /// <summary>Show Device Batches
                /// <para>Can show device batches</para>
                /// </summary>
                public const string Show = "Config.DeviceBatch.Show";

                /// <summary>Show Timeline
                /// <para>Can show device batch timeline</para>
                /// </summary>
                public const string ShowTimeline = "Config.DeviceBatch.ShowTimeline";
            }

            /// <summary>Device Models
            /// <para>Permissions related to Device Models</para>
            /// </summary>
            public static class DeviceModel
            {

                /// <summary>Configure Device Model Components
                /// <para>Can configure device model components</para>
                /// </summary>
                public const string ConfigureComponents = "Config.DeviceModel.ConfigureComponents";

                /// <summary>Configure Device Models
                /// <para>Can configure device models</para>
                /// </summary>
                public const string Configure = "Config.DeviceModel.Configure";

                /// <summary>Delete Device Models
                /// <para>Can delete device models</para>
                /// </summary>
                public const string Delete = "Config.DeviceModel.Delete";

                /// <summary>Show Device Models
                /// <para>Can show device models</para>
                /// </summary>
                public const string Show = "Config.DeviceModel.Show";
            }

            /// <summary>Device Profiles
            /// <para>Permissions related to Device Profiles</para>
            /// </summary>
            public static class DeviceProfile
            {

                /// <summary>Configure Computer Name Templates
                /// <para>Can configure computer name templates for device profiles</para>
                /// </summary>
                public const string ConfigureComputerNameTemplate = "Config.DeviceProfile.ConfigureComputerNameTemplate";

                /// <summary>Configure Default Device Profiles
                /// <para>Can configure default device profiles</para>
                /// </summary>
                public const string ConfigureDefaults = "Config.DeviceProfile.ConfigureDefaults";

                /// <summary>Configure Device Profiles
                /// <para>Can configure device profiles</para>
                /// </summary>
                public const string Configure = "Config.DeviceProfile.Configure";

                /// <summary>Create Device Profiles
                /// <para>Can create device profiles</para>
                /// </summary>
                public const string Create = "Config.DeviceProfile.Create";

                /// <summary>Delete Device Profiles
                /// <para>Can delete device profiles</para>
                /// </summary>
                public const string Delete = "Config.DeviceProfile.Delete";

                /// <summary>Show Device Profiles
                /// <para>Can show device profiles</para>
                /// </summary>
                public const string Show = "Config.DeviceProfile.Show";
            }

            /// <summary>Document Templates
            /// <para>Permissions related to Document Templates</para>
            /// </summary>
            public static class DocumentTemplate
            {

                /// <summary>Bulk Generate Document Templates
                /// <para>Can bulk generate document templates</para>
                /// </summary>
                public const string BulkGenerate = "Config.DocumentTemplate.BulkGenerate";

                /// <summary>Configure Document Templates
                /// <para>Can configure document templates</para>
                /// </summary>
                public const string Configure = "Config.DocumentTemplate.Configure";

                /// <summary>Configure Filter Expression
                /// <para>Can configure filter expressions for document templates</para>
                /// </summary>
                public const string ConfigureFilterExpression = "Config.DocumentTemplate.ConfigureFilterExpression";

                /// <summary>Create Document Templates
                /// <para>Can create document templates</para>
                /// </summary>
                public const string Create = "Config.DocumentTemplate.Create";

                /// <summary>Delete Document Templates
                /// <para>Can delete document templates</para>
                /// </summary>
                public const string Delete = "Config.DocumentTemplate.Delete";

                /// <summary>Process Undetected Pages
                /// <para>Can show and assign imported documents which were not undetected</para>
                /// </summary>
                public const string UndetectedPages = "Config.DocumentTemplate.UndetectedPages";

                /// <summary>Show Document Template Import Status
                /// <para>Can show the document template import status</para>
                /// </summary>
                public const string ShowStatus = "Config.DocumentTemplate.ShowStatus";

                /// <summary>Show Document Templates
                /// <para>Can show document templates</para>
                /// </summary>
                public const string Show = "Config.DocumentTemplate.Show";

                /// <summary>Upload Document Templates
                /// <para>Can upload document templates</para>
                /// </summary>
                public const string Upload = "Config.DocumentTemplate.Upload";
            }

            /// <summary>Logging
            /// <para>Permissions related to Logging</para>
            /// </summary>
            public static class Logging
            {

                /// <summary>Show Logging
                /// <para>Can show logging</para>
                /// </summary>
                public const string Show = "Config.Logging.Show";
            }

            /// <summary>Plugin
            /// <para>Permissions related to Plugins</para>
            /// </summary>
            public static class Plugin
            {

                /// <summary>Configure Plugins
                /// <para>Can configure plugins</para>
                /// </summary>
                public const string Configure = "Config.Plugin.Configure";

                /// <summary>Install/Update Local Plugins
                /// <para>Can install and update locally uploaded plugins</para>
                /// </summary>
                public const string InstallLocal = "Config.Plugin.InstallLocal";

                /// <summary>Install/Update Plugins
                /// <para>Can install and update plugins</para>
                /// </summary>
                public const string Install = "Config.Plugin.Install";

                /// <summary>Show Plugins
                /// <para>Can show plugins</para>
                /// </summary>
                public const string Show = "Config.Plugin.Show";

                /// <summary>Uninstall Plugins
                /// <para>Can uninstall plugins</para>
                /// </summary>
                public const string Uninstall = "Config.Plugin.Uninstall";
            }

            /// <summary>System
            /// <para>Permissions related to System Configuration</para>
            /// </summary>
            public static class System
            {

                /// <summary>Configure Active Directory Settings
                /// <para>Can configure the Active Directory interoperability settings</para>
                /// </summary>
                public const string ConfigureActiveDirectory = "Config.System.ConfigureActiveDirectory";

                /// <summary>Configure Proxy Settings
                /// <para>Can configure the proxy settings</para>
                /// </summary>
                public const string ConfigureProxy = "Config.System.ConfigureProxy";

                /// <summary>Show System Configuration
                /// <para>Can show the system configuration</para>
                /// </summary>
                public const string Show = "Config.System.Show";
            }

            /// <summary>Organisation Details
            /// <para>Permissions related to the Organisation Details</para>
            /// </summary>
            public static class Organisation
            {

                /// <summary>Configure Addresses
                /// <para>Can configure organisation addresses</para>
                /// </summary>
                public const string ConfigureAddresses = "Config.Organisation.ConfigureAddresses";

                /// <summary>Configure Logo
                /// <para>Can configure the organisation logo</para>
                /// </summary>
                public const string ConfigureLogo = "Config.Organisation.ConfigureLogo";

                /// <summary>Configure Multi-Site Mode
                /// <para>Can configure multi-site mode</para>
                /// </summary>
                public const string ConfigureMultiSiteMode = "Config.Organisation.ConfigureMultiSiteMode";

                /// <summary>Configure Name
                /// <para>Can configure the organisation name</para>
                /// </summary>
                public const string ConfigureName = "Config.Organisation.ConfigureName";

                /// <summary>Show Organisation Details
                /// <para>Can show the organisation details</para>
                /// </summary>
                public const string Show = "Config.Organisation.Show";
            }

            /// <summary>Job Preferences
            /// <para>Permissions related to Job Preferences</para>
            /// </summary>
            public static class JobPreferences
            {

                /// <summary>Configure Job Preferences
                /// <para>Can configure job preferences</para>
                /// </summary>
                public const string Configure = "Config.JobPreferences.Configure";

                /// <summary>Show Job Preferences
                /// <para>Can show job preferences</para>
                /// </summary>
                public const string Show = "Config.JobPreferences.Show";
            }

            /// <summary>Job Queues
            /// <para>Permissions related to Job Queues</para>
            /// </summary>
            public static class JobQueue
            {

                /// <summary>Configure Job Queues
                /// <para>Can configure job queues</para>
                /// </summary>
                public const string Configure = "Config.JobQueue.Configure";

                /// <summary>Create Job Queues
                /// <para>Can create job queues</para>
                /// </summary>
                public const string Create = "Config.JobQueue.Create";

                /// <summary>Delete Job Queues
                /// <para>Can delete job queues</para>
                /// </summary>
                public const string Delete = "Config.JobQueue.Delete";

                /// <summary>Show Job Queues
                /// <para>Can show job queues</para>
                /// </summary>
                public const string Show = "Config.JobQueue.Show";
            }

            /// <summary>User Flags
            /// <para>Permissions related to User Flags</para>
            /// </summary>
            public static class UserFlag
            {

                /// <summary>Configure User Flags
                /// <para>Can configure user flags</para>
                /// </summary>
                public const string Configure = "Config.UserFlag.Configure";

                /// <summary>Create User Flags
                /// <para>Can create user flags</para>
                /// </summary>
                public const string Create = "Config.UserFlag.Create";

                /// <summary>Delete User Flags
                /// <para>Can delete user flags</para>
                /// </summary>
                public const string Delete = "Config.UserFlag.Delete";

                /// <summary>Show User Flags
                /// <para>Can show user flags</para>
                /// </summary>
                public const string Show = "Config.UserFlag.Show";
            }

            /// <summary>Show Configuration
            /// <para>Can show the configuration menu</para>
            /// </summary>
            public const string Show = "Config.Show";
        }

        /// <summary>Job
        /// <para>Permissions related to Jobs</para>
        /// </summary>
        public static class Job
        {

            /// <summary>Lists
            /// <para>Permissions related to Job Lists</para>
            /// </summary>
            public static class Lists
            {

                /// <summary>All Open List
                /// <para>Can show list</para>
                /// </summary>
                public const string AllOpen = "Job.Lists.AllOpen";

                /// <summary>Awaiting Finance Agreement Breach List
                /// <para>Can show list (NOTE: Requires Awaiting Finance List)</para>
                /// </summary>
                public const string AwaitingFinanceAgreementBreach = "Job.Lists.AwaitingFinanceAgreementBreach";

                /// <summary>Awaiting Finance Charge List
                /// <para>Can show list (NOTE: Requires Awaiting Finance List)</para>
                /// </summary>
                public const string AwaitingFinanceCharge = "Job.Lists.AwaitingFinanceCharge";

                /// <summary>Awaiting Finance Insurance Processing List
                /// <para>Can show list (NOTE: Requires Awaiting Finance List)</para>
                /// </summary>
                public const string AwaitingFinanceInsuranceProcessing = "Job.Lists.AwaitingFinanceInsuranceProcessing";

                /// <summary>Awaiting Finance List
                /// <para>Can show list</para>
                /// </summary>
                public const string AwaitingFinance = "Job.Lists.AwaitingFinance";

                /// <summary>Awaiting Finance Payment List
                /// <para>Can show list (NOTE: Requires Awaiting Finance List)</para>
                /// </summary>
                public const string AwaitingFinancePayment = "Job.Lists.AwaitingFinancePayment";

                /// <summary>Awaiting Technician Action List
                /// <para>Can show list</para>
                /// </summary>
                public const string AwaitingTechnicianAction = "Job.Lists.AwaitingTechnicianAction";

                /// <summary>Awaiting User Action List
                /// <para>Can show list</para>
                /// </summary>
                public const string AwaitingUserAction = "Job.Lists.AwaitingUserAction";

                /// <summary>Devices Awaiting Repair List
                /// <para>Can show list</para>
                /// </summary>
                public const string DevicesAwaitingRepair = "Job.Lists.DevicesAwaitingRepair";

                /// <summary>Devices Ready For Return List
                /// <para>Can show list</para>
                /// </summary>
                public const string DevicesReadyForReturn = "Job.Lists.DevicesReadyForReturn";

                /// <summary>Job Queue Lists
                /// <para>Can show job queue lists</para>
                /// </summary>
                public const string JobQueueLists = "Job.Lists.JobQueueLists";

                /// <summary>Locations List
                /// <para>Can show list</para>
                /// </summary>
                public const string Locations = "Job.Lists.Locations";

                /// <summary>Long Running Jobs List
                /// <para>Can show list</para>
                /// </summary>
                public const string LongRunningJobs = "Job.Lists.LongRunningJobs";

                /// <summary>My Jobs List
                /// <para>Can show list</para>
                /// </summary>
                public const string MyJobs = "Job.Lists.MyJobs";

                /// <summary>My Jobs List (Includes No Queue)
                /// <para>Can show list</para>
                /// </summary>
                public const string MyJobsOrphaned = "Job.Lists.MyJobsOrphaned";

                /// <summary>Recently Closed List
                /// <para>Can show list</para>
                /// </summary>
                public const string RecentlyClosed = "Job.Lists.RecentlyClosed";

                /// <summary>Stale Jobs List
                /// <para>Can show list</para>
                /// </summary>
                public const string StaleJobs = "Job.Lists.StaleJobs";
            }

            /// <summary>Actions
            /// <para>Permissions related to Job Actions</para>
            /// </summary>
            public static class Actions
            {

                /// <summary>Add Attachments
                /// <para>Can add attachments to jobs</para>
                /// </summary>
                public const string AddAttachments = "Job.Actions.AddAttachments";

                /// <summary>Add Logs
                /// <para>Can add job logs</para>
                /// </summary>
                public const string AddLogs = "Job.Actions.AddLogs";

                /// <summary>Add to Any Queues
                /// <para>Can add to any job queues</para>
                /// </summary>
                public const string AddAnyQueues = "Job.Actions.AddAnyQueues";

                /// <summary>Add to Own Queues
                /// <para>Can add to own job queues</para>
                /// </summary>
                public const string AddOwnQueues = "Job.Actions.AddOwnQueues";

                /// <summary>Close Jobs
                /// <para>Can close jobs</para>
                /// </summary>
                public const string Close = "Job.Actions.Close";

                /// <summary>Convert HWar Jobs To HNWar
                /// <para>Can convert warranty jobs to non-warranty jobs</para>
                /// </summary>
                public const string ConvertHWarToHNWar = "Job.Actions.ConvertHWarToHNWar";

                /// <summary>Create Jobs
                /// <para>Can create jobs</para>
                /// </summary>
                public const string Create = "Job.Actions.Create";

                /// <summary>Delete Jobs
                /// <para>Can delete jobs</para>
                /// </summary>
                public const string Delete = "Job.Actions.Delete";

                /// <summary>Force Close Jobs
                /// <para>Can force close jobs</para>
                /// </summary>
                public const string ForceClose = "Job.Actions.ForceClose";

                /// <summary>Generate Documents
                /// <para>Can generate documents for jobs</para>
                /// </summary>
                public const string GenerateDocuments = "Job.Actions.GenerateDocuments";

                /// <summary>Log Repair
                /// <para>Can log repair for non-warranty jobs</para>
                /// </summary>
                public const string LogRepair = "Job.Actions.LogRepair";

                /// <summary>Log Warranty
                /// <para>Can log warranty for jobs</para>
                /// </summary>
                public const string LogWarranty = "Job.Actions.LogWarranty";

                /// <summary>Remove Any Attachments
                /// <para>Can remove any attachments from jobs</para>
                /// </summary>
                public const string RemoveAnyAttachments = "Job.Actions.RemoveAnyAttachments";

                /// <summary>Remove Any Logs
                /// <para>Can remove any job logs</para>
                /// </summary>
                public const string RemoveAnyLogs = "Job.Actions.RemoveAnyLogs";

                /// <summary>Remove from Any Queues
                /// <para>Can remove from any job queues</para>
                /// </summary>
                public const string RemoveAnyQueues = "Job.Actions.RemoveAnyQueues";

                /// <summary>Remove from Own Queues
                /// <para>Can remove from own job queues</para>
                /// </summary>
                public const string RemoveOwnQueues = "Job.Actions.RemoveOwnQueues";

                /// <summary>Remove Own Attachments
                /// <para>Can remove own attachments from jobs</para>
                /// </summary>
                public const string RemoveOwnAttachments = "Job.Actions.RemoveOwnAttachments";

                /// <summary>Remove Own Logs
                /// <para>Can remove own job logs</para>
                /// </summary>
                public const string RemoveOwnLogs = "Job.Actions.RemoveOwnLogs";

                /// <summary>Reopen Jobs
                /// <para>Can reopen jobs</para>
                /// </summary>
                public const string Reopen = "Job.Actions.Reopen";

                /// <summary>Update Sub Types
                /// <para>Can update sub types for jobs</para>
                /// </summary>
                public const string UpdateSubTypes = "Job.Actions.UpdateSubTypes";
            }

            /// <summary>Job Properties
            /// <para>Permissions related to Job Properties</para>
            /// </summary>
            public static class Properties
            {

                /// <summary>Warranty Properties
                /// <para>Permissions related to Warranty Job Properties</para>
                /// </summary>
                public static class WarrantyProperties
                {

                    /// <summary>External Completed Date Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string ExternalCompletedDate = "Job.Properties.WarrantyProperties.ExternalCompletedDate";

                    /// <summary>External Logged Date Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string ExternalLoggedDate = "Job.Properties.WarrantyProperties.ExternalLoggedDate";

                    /// <summary>External Name Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string ExternalName = "Job.Properties.WarrantyProperties.ExternalName";

                    /// <summary>External Reference Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string ExternalReference = "Job.Properties.WarrantyProperties.ExternalReference";

                    /// <summary>Provider Details
                    /// <para>Can access warranty provider details</para>
                    /// </summary>
                    public const string ProviderDetails = "Job.Properties.WarrantyProperties.ProviderDetails";

                    /// <summary>Warranty Completed Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string WarrantyCompleted = "Job.Properties.WarrantyProperties.WarrantyCompleted";
                }

                /// <summary>Non Warranty Properties
                /// <para>Permissions related to Non-Warranty Job Properties</para>
                /// </summary>
                public static class NonWarrantyProperties
                {

                    /// <summary>Accounting Charge Added Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string AccountingChargeAdded = "Job.Properties.NonWarrantyProperties.AccountingChargeAdded";

                    /// <summary>Accounting Charge Paid Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string AccountingChargePaid = "Job.Properties.NonWarrantyProperties.AccountingChargePaid";

                    /// <summary>Accounting Charge Required Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string AccountingChargeRequired = "Job.Properties.NonWarrantyProperties.AccountingChargeRequired";

                    /// <summary>Add Components
                    /// <para>Can add job components (NOTE: Requires Edit Components)</para>
                    /// </summary>
                    public const string AddComponents = "Job.Properties.NonWarrantyProperties.AddComponents";

                    /// <summary>Edit Components
                    /// <para>Can edit and remove job components</para>
                    /// </summary>
                    public const string EditComponents = "Job.Properties.NonWarrantyProperties.EditComponents";

                    /// <summary>Insurance Claim Form Sent Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string InsuranceClaimFormSent = "Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent";

                    /// <summary>Insurance Detail Properties
                    /// <para>Can update insurance detail properties</para>
                    /// </summary>
                    public const string InsuranceDetails = "Job.Properties.NonWarrantyProperties.InsuranceDetails";

                    /// <summary>Invoice Received Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string InvoiceReceived = "Job.Properties.NonWarrantyProperties.InvoiceReceived";

                    /// <summary>Is Insurance Claim  Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string IsInsuranceClaim = "Job.Properties.NonWarrantyProperties.IsInsuranceClaim";

                    /// <summary>Purchase Order Raised Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string PurchaseOrderRaised = "Job.Properties.NonWarrantyProperties.PurchaseOrderRaised";

                    /// <summary>Purchase Order Reference Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string PurchaseOrderReference = "Job.Properties.NonWarrantyProperties.PurchaseOrderReference";

                    /// <summary>Purchase Order Sent Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string PurchaseOrderSent = "Job.Properties.NonWarrantyProperties.PurchaseOrderSent";

                    /// <summary>Repair Provider Details
                    /// <para>Can access repair provider details</para>
                    /// </summary>
                    public const string RepairProviderDetails = "Job.Properties.NonWarrantyProperties.RepairProviderDetails";

                    /// <summary>Repairer Completed Date Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string RepairerCompletedDate = "Job.Properties.NonWarrantyProperties.RepairerCompletedDate";

                    /// <summary>Repairer Logged Date Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string RepairerLoggedDate = "Job.Properties.NonWarrantyProperties.RepairerLoggedDate";

                    /// <summary>Repairer Name Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string RepairerName = "Job.Properties.NonWarrantyProperties.RepairerName";

                    /// <summary>Repairer Reference Property
                    /// <para>Can update property</para>
                    /// </summary>
                    public const string RepairerReference = "Job.Properties.NonWarrantyProperties.RepairerReference";
                }

                /// <summary>Job Queue Properties
                /// <para>Permissions related to Job Queue Job Properties</para>
                /// </summary>
                public static class JobQueueProperties
                {

                    /// <summary>Edit Any Comments
                    /// <para>Can edit any job queue comments</para>
                    /// </summary>
                    public const string EditAnyComments = "Job.Properties.JobQueueProperties.EditAnyComments";

                    /// <summary>Edit Any Priority
                    /// <para>Can edit any job queue Priority</para>
                    /// </summary>
                    public const string EditAnyPriority = "Job.Properties.JobQueueProperties.EditAnyPriority";

                    /// <summary>Edit Any SLA
                    /// <para>Can edit any job queue SLA</para>
                    /// </summary>
                    public const string EditAnySLA = "Job.Properties.JobQueueProperties.EditAnySLA";

                    /// <summary>Edit Own Comments
                    /// <para>Can edit own job queue comments</para>
                    /// </summary>
                    public const string EditOwnComments = "Job.Properties.JobQueueProperties.EditOwnComments";

                    /// <summary>Edit Own Priority
                    /// <para>Can edit own job queue Priority</para>
                    /// </summary>
                    public const string EditOwnPriority = "Job.Properties.JobQueueProperties.EditOwnPriority";

                    /// <summary>Edit Own SLA
                    /// <para>Can edit own job queue SLA</para>
                    /// </summary>
                    public const string EditOwnSLA = "Job.Properties.JobQueueProperties.EditOwnSLA";
                }

                /// <summary>Device Held Location Property
                /// <para>Can update property</para>
                /// </summary>
                public const string DeviceHeldLocation = "Job.Properties.DeviceHeldLocation";

                /// <summary>Device Held Property
                /// <para>Can update property</para>
                /// </summary>
                public const string DeviceHeld = "Job.Properties.DeviceHeld";

                /// <summary>Device Ready For Return Property
                /// <para>Can update property</para>
                /// </summary>
                public const string DeviceReadyForReturn = "Job.Properties.DeviceReadyForReturn";

                /// <summary>Device Returned Property
                /// <para>Can update property</para>
                /// </summary>
                public const string DeviceReturned = "Job.Properties.DeviceReturned";

                /// <summary>Expected Closed Date Property
                /// <para>Can update property</para>
                /// </summary>
                public const string ExpectedClosedDate = "Job.Properties.ExpectedClosedDate";

                /// <summary>Flags Property
                /// <para>Can update property</para>
                /// </summary>
                public const string Flags = "Job.Properties.Flags";

                /// <summary>Not Waiting For User Action Property
                /// <para>Can update property</para>
                /// </summary>
                public const string NotWaitingForUserAction = "Job.Properties.NotWaitingForUserAction";

                /// <summary>Waiting For User Action Property
                /// <para>Can update property</para>
                /// </summary>
                public const string WaitingForUserAction = "Job.Properties.WaitingForUserAction";
            }

            /// <summary>Types
            /// <para>Permissions related to Job Types</para>
            /// </summary>
            public static class Types
            {

                /// <summary>Create Hardware - Miscellaneous Jobs
                /// <para>Can create jobs of this type (Requires: Create Jobs)</para>
                /// </summary>
                public const string CreateHMisc = "Job.Types.CreateHMisc";

                /// <summary>Create Hardware - Non-Warranty Jobs
                /// <para>Can create jobs of this type (Requires: Create Jobs)</para>
                /// </summary>
                public const string CreateHNWar = "Job.Types.CreateHNWar";

                /// <summary>Create Hardware - Warranty Jobs
                /// <para>Can create jobs of this type (Requires: Create Jobs)</para>
                /// </summary>
                public const string CreateHWar = "Job.Types.CreateHWar";

                /// <summary>Create Software - Application Jobs
                /// <para>Can create jobs of this type (Requires: Create Jobs)</para>
                /// </summary>
                public const string CreateSApp = "Job.Types.CreateSApp";

                /// <summary>Create Software - Operating System Jobs
                /// <para>Can create jobs of this type (Requires: Create Jobs)</para>
                /// </summary>
                public const string CreateSOS = "Job.Types.CreateSOS";

                /// <summary>Create Software - Reimage Jobs
                /// <para>Can create jobs of this type (Requires: Create Jobs)</para>
                /// </summary>
                public const string CreateSImg = "Job.Types.CreateSImg";

                /// <summary>Create User Management Jobs
                /// <para>Can create jobs of this type (Requires: Create Jobs)</para>
                /// </summary>
                public const string CreateUMgmt = "Job.Types.CreateUMgmt";

                /// <summary>Show Hardware - Miscellaneous Jobs
                /// <para>Can show jobs of this type</para>
                /// </summary>
                public const string ShowHMisc = "Job.Types.ShowHMisc";

                /// <summary>Show Hardware - Non-Warranty Jobs
                /// <para>Can show jobs of this type</para>
                /// </summary>
                public const string ShowHNWar = "Job.Types.ShowHNWar";

                /// <summary>Show Hardware - Warranty Jobs
                /// <para>Can show jobs of this type</para>
                /// </summary>
                public const string ShowHWar = "Job.Types.ShowHWar";

                /// <summary>Show Software - Application Jobs
                /// <para>Can show jobs of this type</para>
                /// </summary>
                public const string ShowSApp = "Job.Types.ShowSApp";

                /// <summary>Show Software - Operating System Jobs
                /// <para>Can show jobs of this type</para>
                /// </summary>
                public const string ShowSOS = "Job.Types.ShowSOS";

                /// <summary>Show Software - Reimage Jobs
                /// <para>Can show jobs of this type</para>
                /// </summary>
                public const string ShowSImg = "Job.Types.ShowSImg";

                /// <summary>Show User Management Jobs
                /// <para>Can show jobs of this type</para>
                /// </summary>
                public const string ShowUMgmt = "Job.Types.ShowUMgmt";
            }

            /// <summary>Search Jobs
            /// <para>Can search jobs</para>
            /// </summary>
            public const string Search = "Job.Search";

            /// <summary>Show Attachments
            /// <para>Can show job attachments</para>
            /// </summary>
            public const string ShowAttachments = "Job.ShowAttachments";

            /// <summary>Show Daily Opened & Closed
            /// <para>Can show daily opened & closed chart</para>
            /// </summary>
            public const string ShowDailyChart = "Job.ShowDailyChart";

            /// <summary>Show Flags
            /// <para>Can show job flags</para>
            /// </summary>
            public const string ShowFlags = "Job.ShowFlags";

            /// <summary>Show Jobs
            /// <para>Can show jobs</para>
            /// </summary>
            public const string Show = "Job.Show";

            /// <summary>Show Jobs Queues
            /// <para>Can show jobs queues</para>
            /// </summary>
            public const string ShowJobsQueues = "Job.ShowJobsQueues";

            /// <summary>Show Logs
            /// <para>Can show job logs</para>
            /// </summary>
            public const string ShowLogs = "Job.ShowLogs";

            /// <summary>Show Non-Warranty Components
            /// <para>Can show non-warranty job components</para>
            /// </summary>
            public const string ShowNonWarrantyComponents = "Job.ShowNonWarrantyComponents";

            /// <summary>Show Non-Warranty Finance
            /// <para>Can show non-warranty job finance</para>
            /// </summary>
            public const string ShowNonWarrantyFinance = "Job.ShowNonWarrantyFinance";

            /// <summary>Show Non-Warranty Insurance
            /// <para>Can show non-warranty job insurance</para>
            /// </summary>
            public const string ShowNonWarrantyInsurance = "Job.ShowNonWarrantyInsurance";

            /// <summary>Show Non-Warranty Repairs
            /// <para>Can show non-warranty job repairs</para>
            /// </summary>
            public const string ShowNonWarrantyRepairs = "Job.ShowNonWarrantyRepairs";

            /// <summary>Show Warranty
            /// <para>Can show job warranty</para>
            /// </summary>
            public const string ShowWarranty = "Job.ShowWarranty";
        }

        /// <summary>Device
        /// <para>Permissions related to Devices</para>
        /// </summary>
        public static class Device
        {

            /// <summary>Device Properties
            /// <para>Permissions related to Device Properties</para>
            /// </summary>
            public static class Properties
            {

                /// <summary>Asset Number Property
                /// <para>Can update property</para>
                /// </summary>
                public const string AssetNumber = "Device.Properties.AssetNumber";

                /// <summary>Detail Properties
                /// <para>Can update detail properties</para>
                /// </summary>
                public const string Details = "Device.Properties.Details";

                /// <summary>Device Batch Property
                /// <para>Can update property</para>
                /// </summary>
                public const string DeviceBatch = "Device.Properties.DeviceBatch";

                /// <summary>Device Profile Property
                /// <para>Can update property</para>
                /// </summary>
                public const string DeviceProfile = "Device.Properties.DeviceProfile";

                /// <summary>Location Property
                /// <para>Can update property</para>
                /// </summary>
                public const string Location = "Device.Properties.Location";
            }

            /// <summary>Actions
            /// <para>Permissions related to Device Actions</para>
            /// </summary>
            public static class Actions
            {

                /// <summary>Add Attachments
                /// <para>Can add attachments to devices</para>
                /// </summary>
                public const string AddAttachments = "Device.Actions.AddAttachments";

                /// <summary>Allow Unauthenticated Enrol
                /// <para>Can allow devices to enrol without authentication</para>
                /// </summary>
                public const string AllowUnauthenticatedEnrol = "Device.Actions.AllowUnauthenticatedEnrol";

                /// <summary>Assign User
                /// <para>Can update the user assignment of devices</para>
                /// </summary>
                public const string AssignUser = "Device.Actions.AssignUser";

                /// <summary>Decommission
                /// <para>Can decommission devices</para>
                /// </summary>
                public const string Decommission = "Device.Actions.Decommission";

                /// <summary>Delete
                /// <para>Can delete devices</para>
                /// </summary>
                public const string Delete = "Device.Actions.Delete";

                /// <summary>Enrol Devices
                /// <para>Can add devices offline and enrol devices with the Bootstrapper</para>
                /// </summary>
                public const string EnrolDevices = "Device.Actions.EnrolDevices";

                /// <summary>Export Devices
                /// <para>Can export devices in a bulk format</para>
                /// </summary>
                public const string Export = "Device.Actions.Export";

                /// <summary>Generate Documents
                /// <para>Can generate documents for jobs</para>
                /// </summary>
                public const string GenerateDocuments = "Device.Actions.GenerateDocuments";

                /// <summary>Import Devices
                /// <para>Can bulk import devices</para>
                /// </summary>
                public const string Import = "Device.Actions.Import";

                /// <summary>Recommission
                /// <para>Can recommission devices</para>
                /// </summary>
                public const string Recommission = "Device.Actions.Recommission";

                /// <summary>Remove Any Attachments
                /// <para>Can remove any attachments from devices</para>
                /// </summary>
                public const string RemoveAnyAttachments = "Device.Actions.RemoveAnyAttachments";

                /// <summary>Remove Own Attachments
                /// <para>Can remove own attachments from devices</para>
                /// </summary>
                public const string RemoveOwnAttachments = "Device.Actions.RemoveOwnAttachments";
            }

            /// <summary>Search Devices
            /// <para>Can search devices</para>
            /// </summary>
            public const string Search = "Device.Search";

            /// <summary>Show Assignment History
            /// <para>Can show the assignment history for devices</para>
            /// </summary>
            public const string ShowAssignmentHistory = "Device.ShowAssignmentHistory";

            /// <summary>Show Attachments
            /// <para>Can show device attachments</para>
            /// </summary>
            public const string ShowAttachments = "Device.ShowAttachments";

            /// <summary>Show Certificates
            /// <para>Can show certificates associated with devices</para>
            /// </summary>
            public const string ShowCertificates = "Device.ShowCertificates";

            /// <summary>Show Details
            /// <para>Can show details associated with devices</para>
            /// </summary>
            public const string ShowDetails = "Device.ShowDetails";

            /// <summary>Show Devices
            /// <para>Can show devices</para>
            /// </summary>
            public const string Show = "Device.Show";

            /// <summary>Show Devices Jobs
            /// <para>Can show jobs associated with devices</para>
            /// </summary>
            public const string ShowJobs = "Device.ShowJobs";
        }

        /// <summary>User
        /// <para>Permissions related to Users</para>
        /// </summary>
        public static class User
        {

            /// <summary>Actions
            /// <para>Permissions related to User Actions</para>
            /// </summary>
            public static class Actions
            {

                /// <summary>Add Attachments
                /// <para>Can add attachments to users</para>
                /// </summary>
                public const string AddAttachments = "User.Actions.AddAttachments";

                /// <summary>Add User Flags
                /// <para>Can add user flags</para>
                /// </summary>
                public const string AddFlags = "User.Actions.AddFlags";

                /// <summary>Edit User Flags
                /// <para>Can edit user flags</para>
                /// </summary>
                public const string EditFlags = "User.Actions.EditFlags";

                /// <summary>Generate Documents
                /// <para>Can generate documents for users</para>
                /// </summary>
                public const string GenerateDocuments = "User.Actions.GenerateDocuments";

                /// <summary>Remove Any Attachments
                /// <para>Can remove any attachments from users</para>
                /// </summary>
                public const string RemoveAnyAttachments = "User.Actions.RemoveAnyAttachments";

                /// <summary>Remove Own Attachments
                /// <para>Can remove own attachments from users</para>
                /// </summary>
                public const string RemoveOwnAttachments = "User.Actions.RemoveOwnAttachments";

                /// <summary>Remove User Flags
                /// <para>Can remove user flags</para>
                /// </summary>
                public const string RemoveFlags = "User.Actions.RemoveFlags";
            }

            /// <summary>Search Users
            /// <para>Can search users</para>
            /// </summary>
            public const string Search = "User.Search";

            /// <summary>Show Attachments
            /// <para>Can show user attachments</para>
            /// </summary>
            public const string ShowAttachments = "User.ShowAttachments";

            /// <summary>Show Device Assignment History
            /// <para>Can show the device assignment history for users</para>
            /// </summary>
            public const string ShowAssignmentHistory = "User.ShowAssignmentHistory";

            /// <summary>Show Device Assignments
            /// <para>Can show the current device assignments users</para>
            /// </summary>
            public const string ShowAssignments = "User.ShowAssignments";

            /// <summary>Show Users
            /// <para>Can show users</para>
            /// </summary>
            public const string Show = "User.Show";

            /// <summary>Show Users Authorization
            /// <para>Can show authorization permissions associated with users</para>
            /// </summary>
            public const string ShowAuthorization = "User.ShowAuthorization";

            /// <summary>Show Users Details
            /// <para>Can show users contact and personal details</para>
            /// </summary>
            public const string ShowDetails = "User.ShowDetails";

            /// <summary>Show Users Flag Assignments
            /// <para>Can show flags associated with users</para>
            /// </summary>
            public const string ShowFlagAssignments = "User.ShowFlagAssignments";

            /// <summary>Show Users Jobs
            /// <para>Can show jobs associated with users</para>
            /// </summary>
            public const string ShowJobs = "User.ShowJobs";
        }

        /// <summary>Computer Account
        /// <para>Represents a computer account</para>
        /// </summary>
        public const string ComputerAccount = "ComputerAccount";

        /// <summary>Disco Administrator Account
        /// <para>Represents a Disco Administrator account</para>
        /// </summary>
        public const string DiscoAdminAccount = "DiscoAdminAccount";
#endregion
	}
	public static class ClaimExtensions
	{
        public static bool Has(this RoleClaims c, string ClaimKey)
        {
            Func<RoleClaims, bool> claimFunc = Claims.GetClaimAccessor(ClaimKey);

            return claimFunc(c);
        }

		public static void Set(this RoleClaims c, string ClaimKey, bool Value)
        {
            var claimDefinition = Claims.GetClaimDefinition(ClaimKey);

			if (!claimDefinition.Item5)
				claimDefinition.Item2(c, Value);
        }

		public static void SetClaims(this AuthorizationRole role, RoleClaims Claims)
        {
            role.ClaimsJson = Newtonsoft.Json.JsonConvert.SerializeObject(Claims);
        }
	}
}
