< Summary

Information
Class: OzonDomains.Models.Authorization.UserPageOverride
Assembly: OzonDomains
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Authorization/UserPageOverride.cs
Line coverage
80%
Covered lines: 8
Uncovered lines: 2
Coverable lines: 10
Total lines: 26
Line coverage: 80%
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%210%
get_UserId()100%11100%
get_AppPageId()100%11100%
get_AppPage()100%210%
get_CanView()100%11100%
get_CanCreate()100%11100%
get_CanEdit()100%11100%
get_CanDelete()100%11100%
get_CanExport()100%11100%
get_UpdatedAt()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonDomains/Models/Authorization/UserPageOverride.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2
 3namespace OzonDomains.Models.Authorization;
 4
 5/// <summary>
 6/// Персональное переопределение прав пользователя на страницу.
 7/// null означает «использовать настройку из роли».
 8/// </summary>
 9public class UserPageOverride
 10{
 011    public int Id { get; set; }
 12
 13    [Required, MaxLength(450)]
 914    public string UserId { get; set; } = string.Empty;
 15
 916    public int AppPageId { get; set; }
 017    public virtual AppPage AppPage { get; set; } = null!;
 18
 519    public bool? CanView { get; set; }
 420    public bool? CanCreate { get; set; }
 421    public bool? CanEdit { get; set; }
 322    public bool? CanDelete { get; set; }
 423    public bool? CanExport { get; set; }
 24
 625    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
 26}