< Summary

Information
Class: Services.AccessControl.UserDataScope
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/AccessControl/UserDataScope.cs
Line coverage
100%
Covered lines: 16
Uncovered lines: 0
Coverable lines: 16
Total lines: 24
Line coverage: 100%
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
.ctor(...)100%11100%
get_AppStatusIds()100%11100%
get_SupplierIds()100%11100%
get_OzonClientIds()100%11100%
get_WarehouseIds()100%11100%
get_DeliveryProviderIds()100%11100%
get_IsUnrestricted()100%11100%
.cctor()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/AccessControl/UserDataScope.cs

#LineLine coverage
 1namespace Services.AccessControl;
 2
 3/// <summary>
 4/// Результат вычисления RLS-ограничений для конкретного пользователя.
 5/// IsUnrestricted = true означает, что нет ни одного ограничения — пользователь видит все данные.
 6/// </summary>
 117public record UserDataScope(
 88    IReadOnlySet<int> AppStatusIds,
 119    IReadOnlySet<int> SupplierIds,
 910    IReadOnlySet<int> OzonClientIds,
 1011    IReadOnlySet<int> WarehouseIds,
 912    IReadOnlySet<int> DeliveryProviderIds,
 1513    bool IsUnrestricted
 1114)
 15{
 116    public static readonly UserDataScope Unrestricted = new(
 117        AppStatusIds: new HashSet<int>(),
 118        SupplierIds: new HashSet<int>(),
 119        OzonClientIds: new HashSet<int>(),
 120        WarehouseIds: new HashSet<int>(),
 121        DeliveryProviderIds: new HashSet<int>(),
 122        IsUnrestricted: true
 123    );
 24}