< Summary

Information
Class: Services.Authorization.Dtos.UserPermissionsBundle
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/Authorization/Dtos/UserPermissionsBundle.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
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_UserId()100%11100%
get_ComputedAt()100%11100%
get_RoleNames()100%11100%
get_Pages()100%11100%
get_Fields()100%11100%
get_DataScopes()100%11100%
get_IsSuperAdmin()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{
 2508    public string UserId { get; set; } = string.Empty;
 9
 12310    public DateTime ComputedAt { get; set; } = DateTime.UtcNow;
 11
 12    /// <summary>Имена прикладных ролей пользователя.</summary>
 17713    public List<string> RoleNames { get; set; } = new();
 14
 20115    public List<PagePermissionDto> Pages { get; set; } = new();
 19516    public List<FieldPermissionDto> Fields { get; set; } = new();
 17
 18    /// <summary>Коды DataScope, назначенных пользователю (через роли).</summary>
 29219    public List<DataScopeRef> DataScopes { get; set; } = new();
 20
 21    /// <summary>Является ли пользователь SuperAdmin (даёт бесконтрольные права).</summary>
 24422    public bool IsSuperAdmin { get; set; }
 23}
 24
 25public class DataScopeRef
 26{
 27    public int Id { get; set; }
 28    public string Code { get; set; } = string.Empty;
 29    public string EntityName { get; set; } = string.Empty;
 30    public string FilterExpression { get; set; } = string.Empty;
 31}