Tidy: Sort/remove usings, simplify names
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles
|
||||
namespace Disco.Services.Authorization.Roles
|
||||
{
|
||||
public abstract class BaseRoleClaimGroup
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles
|
||||
{
|
||||
|
||||
@@ -19,19 +19,19 @@ namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration
|
||||
{
|
||||
public ConfigClaims()
|
||||
{
|
||||
this.DeviceCertificate = new DeviceCertificateClaims();
|
||||
this.Enrolment = new EnrolmentClaims();
|
||||
this.DeviceBatch = new DeviceBatchClaims();
|
||||
this.DeviceModel = new DeviceModelClaims();
|
||||
this.DeviceProfile = new DeviceProfileClaims();
|
||||
this.DocumentTemplate = new DocumentTemplateClaims();
|
||||
this.Logging = new LoggingClaims();
|
||||
this.Plugin = new PluginClaims();
|
||||
this.System = new SystemClaims();
|
||||
this.Organisation = new OrganisationClaims();
|
||||
this.JobPreferences = new JobPreferencesClaims();
|
||||
this.JobQueue = new JobQueueClaims();
|
||||
this.UserFlag = new UserFlagClaims();
|
||||
DeviceCertificate = new DeviceCertificateClaims();
|
||||
Enrolment = new EnrolmentClaims();
|
||||
DeviceBatch = new DeviceBatchClaims();
|
||||
DeviceModel = new DeviceModelClaims();
|
||||
DeviceProfile = new DeviceProfileClaims();
|
||||
DocumentTemplate = new DocumentTemplateClaims();
|
||||
Logging = new LoggingClaims();
|
||||
Plugin = new PluginClaims();
|
||||
System = new SystemClaims();
|
||||
Organisation = new OrganisationClaims();
|
||||
JobPreferences = new JobPreferencesClaims();
|
||||
JobQueue = new JobQueueClaims();
|
||||
UserFlag = new UserFlagClaims();
|
||||
}
|
||||
|
||||
[ClaimDetails("Show Configuration", "Can show the configuration menu")]
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceBatch
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceBatch
|
||||
{
|
||||
[ClaimDetails("Device Batches", "Permissions related to Device Batches")]
|
||||
public class DeviceBatchClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceCertificate
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceCertificate
|
||||
{
|
||||
[ClaimDetails("Device Certificates", "Permissions related to Device Certificates")]
|
||||
public class DeviceCertificateClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceModel
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceModel
|
||||
{
|
||||
[ClaimDetails("Device Models", "Permissions related to Device Models")]
|
||||
public class DeviceModelClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceProfile
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DeviceProfile
|
||||
{
|
||||
[ClaimDetails("Device Profiles", "Permissions related to Device Profiles")]
|
||||
public class DeviceProfileClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DocumentTemplate
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.DocumentTemplate
|
||||
{
|
||||
[ClaimDetails("Document Templates", "Permissions related to Document Templates")]
|
||||
public class DocumentTemplateClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Enrolment
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Enrolment
|
||||
{
|
||||
[ClaimDetails("Enrolment", "Permissions related to Device Enrolment")]
|
||||
public class EnrolmentClaims
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.JobQueue
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.JobQueue
|
||||
{
|
||||
[ClaimDetails("Job Queues", "Permissions related to Job Queues")]
|
||||
public class JobQueueClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Logging
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Logging
|
||||
{
|
||||
[ClaimDetails("Logging", "Permissions related to Logging")]
|
||||
public class LoggingClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Origanisation
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Origanisation
|
||||
{
|
||||
[ClaimDetails("Organisation Details", "Permissions related to the Organisation Details")]
|
||||
public class OrganisationClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Plugin
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.Plugin
|
||||
{
|
||||
[ClaimDetails("Plugin", "Permissions related to Plugins")]
|
||||
public class PluginClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.System
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Configuration.System
|
||||
{
|
||||
[ClaimDetails("System", "Permissions related to System Configuration")]
|
||||
public class SystemClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Device
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Device
|
||||
{
|
||||
[ClaimDetails("Actions", "Permissions related to Device Actions")]
|
||||
public class DeviceActionsClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Device
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Device
|
||||
{
|
||||
[ClaimDetails("Device", "Permissions related to Devices")]
|
||||
public class DeviceClaims : BaseRoleClaimGroup
|
||||
{
|
||||
public DeviceClaims()
|
||||
{
|
||||
this.Properties = new DevicePropertiesClaims();
|
||||
this.Actions = new DeviceActionsClaims();
|
||||
Properties = new DevicePropertiesClaims();
|
||||
Actions = new DeviceActionsClaims();
|
||||
}
|
||||
|
||||
[ClaimDetails("Search Devices", "Can search devices")]
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Device
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Device
|
||||
{
|
||||
[ClaimDetails("Device Properties", "Permissions related to Device Properties")]
|
||||
public class DevicePropertiesClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Actions", "Permissions related to Job Actions")]
|
||||
public class JobActionsClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Job", "Permissions related to Jobs")]
|
||||
public class JobClaims : BaseRoleClaimGroup
|
||||
{
|
||||
public JobClaims()
|
||||
{
|
||||
this.Lists = new JobListsClaims();
|
||||
this.Actions = new JobActionsClaims();
|
||||
this.Properties = new JobPropertiesClaims();
|
||||
this.Types = new JobTypesClaims();
|
||||
Lists = new JobListsClaims();
|
||||
Actions = new JobActionsClaims();
|
||||
Properties = new JobPropertiesClaims();
|
||||
Types = new JobTypesClaims();
|
||||
}
|
||||
|
||||
[ClaimDetails("Search Jobs", "Can search jobs")]
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Lists", "Permissions related to Job Lists")]
|
||||
public class JobListsClaims : BaseRoleClaimGroup
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Non Warranty Properties", "Permissions related to Non-Warranty Job Properties")]
|
||||
public class JobNonWarrantyPropertiesClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Job Properties", "Permissions related to Job Properties")]
|
||||
public class JobPropertiesClaims : BaseRoleClaimGroup
|
||||
{
|
||||
public JobPropertiesClaims()
|
||||
{
|
||||
this.WarrantyProperties = new JobWarrantyPropertiesClaims();
|
||||
this.NonWarrantyProperties = new JobNonWarrantyPropertiesClaims();
|
||||
this.JobQueueProperties = new JobQueuePropertiesClaims();
|
||||
WarrantyProperties = new JobWarrantyPropertiesClaims();
|
||||
NonWarrantyProperties = new JobNonWarrantyPropertiesClaims();
|
||||
JobQueueProperties = new JobQueuePropertiesClaims();
|
||||
}
|
||||
|
||||
public JobWarrantyPropertiesClaims WarrantyProperties { get; set; }
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Job Queue Properties", "Permissions related to Job Queue Job Properties")]
|
||||
public class JobQueuePropertiesClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Types", "Permissions related to Job Types")]
|
||||
public class JobTypesClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.Job
|
||||
{
|
||||
[ClaimDetails("Warranty Properties", "Permissions related to Warranty Job Properties")]
|
||||
public class JobWarrantyPropertiesClaims : BaseRoleClaimGroup
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.User
|
||||
namespace Disco.Services.Authorization.Roles.ClaimGroups.User
|
||||
{
|
||||
[ClaimDetails("User", "Permissions related to Users")]
|
||||
public class UserClaims : BaseRoleClaimGroup
|
||||
{
|
||||
public UserClaims()
|
||||
{
|
||||
this.Actions = new UserActionsClaims();
|
||||
Actions = new UserActionsClaims();
|
||||
}
|
||||
|
||||
[ClaimDetails("Search Users", "Can search users")]
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
using Disco.Models.Services.Authorization;
|
||||
using Disco.Models.Repository;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
using Disco.Services.Authorization.Roles.ClaimGroups;
|
||||
using Disco.Services.Authorization.Roles.ClaimGroups.Configuration;
|
||||
using Disco.Services.Authorization.Roles.ClaimGroups.Configuration;
|
||||
using Disco.Services.Authorization.Roles.ClaimGroups.Device;
|
||||
using Disco.Services.Authorization.Roles.ClaimGroups.Job;
|
||||
using Disco.Services.Authorization.Roles.ClaimGroups.User;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles
|
||||
{
|
||||
@@ -15,11 +9,11 @@ namespace Disco.Services.Authorization.Roles
|
||||
{
|
||||
public RoleClaims()
|
||||
{
|
||||
this.Config = new ConfigClaims();
|
||||
Config = new ConfigClaims();
|
||||
|
||||
this.Job = new JobClaims();
|
||||
this.Device = new DeviceClaims();
|
||||
this.User = new UserClaims();
|
||||
Job = new JobClaims();
|
||||
Device = new DeviceClaims();
|
||||
User = new UserClaims();
|
||||
}
|
||||
|
||||
[ClaimDetails("Computer Account", "Represents a computer account", true)]
|
||||
|
||||
@@ -4,8 +4,6 @@ using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization.Roles
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user