< Summary

Information
Class: Elsa.Diagnostics.StructuredLogs.Permissions.StructuredLogsResourcePermissionsDescriptorProvider
Assembly: Elsa.Diagnostics.StructuredLogs
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Diagnostics.StructuredLogs/Permissions/StructuredLogsResourcePermissions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 26
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
GetDescriptors()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Diagnostics.StructuredLogs/Permissions/StructuredLogsResourcePermissions.cs

#LineLine coverage
 1using Elsa.Authorization;
 2using Elsa.Permissions;
 3using JetBrains.Annotations;
 4
 5namespace Elsa.Diagnostics.StructuredLogs.Permissions;
 6
 7/// <summary>
 8/// Stable resource names for Diagnostics. Endpoints reference these constants rather than string
 9/// literals, and the descriptors below are declared alongside them so the two cannot drift.
 10/// </summary>
 11public static class StructuredLogsResourcePermissions
 12{
 13    /// <summary>Read structured log records and their sources.</summary>
 14    public const string StructuredLogs = "diagnostics/structured-logs";
 15}
 16
 17/// <summary>Contributes the Diagnostics resources to the permission catalog.</summary>
 18[UsedImplicitly]
 19public sealed class StructuredLogsResourcePermissionsDescriptorProvider : IPermissionDescriptorProvider
 20{
 21    /// <inheritdoc />
 22    public IEnumerable<PermissionDescriptor> GetDescriptors() =>
 023    [
 024        new(StructuredLogsResourcePermissions.StructuredLogs, [CoreVerbs.View], "Structured logs", "Read structured log 
 025    ];
 26}

Methods/Properties

GetDescriptors()