Tidy: Sort/remove usings, simplify names
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
{
|
||||
@@ -13,21 +9,21 @@ namespace Disco.Services.Authorization
|
||||
|
||||
public AccessDeniedException(string Message, string Resource)
|
||||
{
|
||||
this.message = Message;
|
||||
this.resource = Resource;
|
||||
message = Message;
|
||||
resource = Resource;
|
||||
}
|
||||
|
||||
public override string Message
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.message == null)
|
||||
if (message == null)
|
||||
{
|
||||
return "Your account does not have the required permission to access this Disco feature.";
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.message;
|
||||
return message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +32,7 @@ namespace Disco.Services.Authorization
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.resource;
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Logging;
|
||||
using Disco.Services.Logging.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
{
|
||||
|
||||
@@ -5,9 +5,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
{
|
||||
|
||||
@@ -3,8 +3,6 @@ using Disco.Services.Authorization.Roles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
{
|
||||
@@ -26,9 +24,9 @@ namespace Disco.Services.Authorization
|
||||
{
|
||||
this.Key = Key;
|
||||
var details = Claims.GetClaimDetails(Key);
|
||||
this.Name = details.Item1;
|
||||
this.Description = details.Item2;
|
||||
this.accessor = Claims.GetClaimAccessor(Key);
|
||||
Name = details.Item1;
|
||||
Description = details.Item2;
|
||||
accessor = Claims.GetClaimAccessor(Key);
|
||||
this.Hidden = Hidden;
|
||||
}
|
||||
|
||||
@@ -52,13 +50,13 @@ namespace Disco.Services.Authorization
|
||||
{
|
||||
return new ClaimNavigatorItem()
|
||||
{
|
||||
Key = this.Key,
|
||||
Name = this.Name,
|
||||
Description = this.Description,
|
||||
Hidden = this.Hidden,
|
||||
accessor = this.accessor,
|
||||
Value = this.accessor == null ? (bool?)null : this.accessor(RoleClaims),
|
||||
Children = this.Children == null ? null : this.Children.Cast<ClaimNavigatorItem>().Select(c => c.BuildClaimTree(RoleClaims)).ToList()
|
||||
Key = Key,
|
||||
Name = Name,
|
||||
Description = Description,
|
||||
Hidden = Hidden,
|
||||
accessor = accessor,
|
||||
Value = accessor == null ? (bool?)null : accessor(RoleClaims),
|
||||
Children = Children == null ? null : Children.Cast<ClaimNavigatorItem>().Select(c => c.BuildClaimTree(RoleClaims)).ToList()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -66,19 +64,19 @@ namespace Disco.Services.Authorization
|
||||
{
|
||||
return new ClaimNavigatorItem()
|
||||
{
|
||||
Key = this.Key,
|
||||
Name = this.Name,
|
||||
Description = this.Description,
|
||||
Hidden = this.Hidden,
|
||||
accessor = this.accessor,
|
||||
Value = this.accessor == null ? (bool?)null : RoleClaims.Any(rc => this.accessor(rc)),
|
||||
Children = this.Children == null ? null : this.Children.Cast<ClaimNavigatorItem>().Select(c => c.BuildClaimTree(RoleClaims)).ToList()
|
||||
Key = Key,
|
||||
Name = Name,
|
||||
Description = Description,
|
||||
Hidden = Hidden,
|
||||
accessor = accessor,
|
||||
Value = accessor == null ? (bool?)null : RoleClaims.Any(rc => accessor(rc)),
|
||||
Children = Children == null ? null : Children.Cast<ClaimNavigatorItem>().Select(c => c.BuildClaimTree(RoleClaims)).ToList()
|
||||
};
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}: {1}={2}", this.Name, this.Key, this.Value);
|
||||
return string.Format("{0}: {1}={2}", Name, Key, Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using Disco.Services.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using System;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
{
|
||||
@@ -17,7 +11,7 @@ namespace Disco.Services.Authorization
|
||||
if (AuthorisedClaims == null || AuthorisedClaims.Length == 0)
|
||||
throw new ArgumentNullException("AuthorisedClaims");
|
||||
|
||||
this.authorizedClaims = AuthorisedClaims;
|
||||
authorizedClaims = AuthorisedClaims;
|
||||
}
|
||||
|
||||
public override bool IsAuthorized(System.Web.HttpContextBase httpContext)
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using Disco.Services.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using System;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
{
|
||||
@@ -17,7 +11,7 @@ namespace Disco.Services.Authorization
|
||||
if (AuthorisedClaims == null || AuthorisedClaims.Length == 0)
|
||||
throw new ArgumentNullException("AuthorisedClaims");
|
||||
|
||||
this.authorizedClaims = AuthorisedClaims;
|
||||
authorizedClaims = AuthorisedClaims;
|
||||
}
|
||||
|
||||
public override bool IsAuthorized(System.Web.HttpContextBase httpContext)
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using Disco.Services.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
{
|
||||
@@ -16,7 +10,7 @@ namespace Disco.Services.Authorization
|
||||
|
||||
public DiscoAuthorizeAttribute(string AuthorisedClaim)
|
||||
{
|
||||
this.authorizedClaim = AuthorisedClaim;
|
||||
authorizedClaim = AuthorisedClaim;
|
||||
}
|
||||
|
||||
public override bool IsAuthorized(System.Web.HttpContextBase httpContext)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using Disco.Services.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Services.Authorization
|
||||
|
||||
@@ -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