< Summary

Information
Class: Elsa.Tenants.Permissions.TenantPermissionsDescriptorProvider
Assembly: Elsa.Tenants
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Tenants/Permissions/TenantPermissions.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.Tenants/Permissions/TenantPermissions.cs

#LineLine coverage
 1using Elsa.Authorization;
 2using Elsa.Permissions;
 3using JetBrains.Annotations;
 4
 5namespace Elsa.Tenants.Permissions;
 6
 7/// <summary>
 8/// Stable resource names for Tenants. 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 TenantPermissions
 12{
 13    /// <summary>Manage tenants and refresh the tenant registry.</summary>
 14    public const string Tenants = "tenants";
 15}
 16
 17/// <summary>Contributes the Tenants resources to the permission catalog.</summary>
 18[UsedImplicitly]
 19public sealed class TenantPermissionsDescriptorProvider : IPermissionDescriptorProvider
 20{
 21    /// <inheritdoc />
 22    public IEnumerable<PermissionDescriptor> GetDescriptors() =>
 023    [
 024        new(TenantPermissions.Tenants, [CoreVerbs.View, CoreVerbs.Write, CoreVerbs.Delete, "refresh"], "Tenants", "Manag
 025    ];
 26}

Methods/Properties

GetDescriptors()