< Summary

Information
Class: Services.Authorization.Dtos.DataScopeRef
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/Authorization/Dtos/UserPermissionsBundle.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 31
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
get_Id()100%11100%
get_Code()100%11100%
get_EntityName()100%11100%
get_FilterExpression()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/Authorization/Dtos/UserPermissionsBundle.cs

#LineLine coverage
 1namespace Services.Authorization.Dtos;
 2
 3/// <summary>
 4/// Полный пакет прав пользователя, кэшируется целиком.
 5/// </summary>
 6public class UserPermissionsBundle
 7{
 8    public string UserId { get; set; } = string.Empty;
 9
 10    public DateTime ComputedAt { get; set; } = DateTime.UtcNow;
 11
 12    /// <summary>Имена прикладных ролей пользователя.</summary>
 13    public List<string> RoleNames { get; set; } = new();
 14
 15    public List<PagePermissionDto> Pages { get; set; } = new();
 16    public List<FieldPermissionDto> Fields { get; set; } = new();
 17
 18    /// <summary>Коды DataScope, назначенных пользователю (через роли).</summary>
 19    public List<DataScopeRef> DataScopes { get; set; } = new();
 20
 21    /// <summary>Является ли пользователь SuperAdmin (даёт бесконтрольные права).</summary>
 22    public bool IsSuperAdmin { get; set; }
 23}
 24
 25public class DataScopeRef
 26{
 1627    public int Id { get; set; }
 8028    public string Code { get; set; } = string.Empty;
 18329    public string EntityName { get; set; } = string.Empty;
 19230    public string FilterExpression { get; set; } = string.Empty;
 31}