< Summary - Estud

Information
Class: Estud.Back.Auth.Roles.EstudDefaultRoles
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Auth/Roles/EstudDefaultRoles.cs
Tag: 114_29044117136
Line coverage
100%
Covered lines: 43
Uncovered lines: 0
Coverable lines: 43
Total lines: 53
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_Director()100%11100%
get_Teacher()100%11100%
get_Student()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Auth/Roles/EstudDefaultRoles.cs

#LineLine coverage
 1using Estud.Back.Domain.Identity;
 2using Estud.Back.Auth.Permissions;
 3
 4namespace Estud.Back.Auth.Roles;
 5
 6public static class EstudDefaultRoles
 7{
 48  public static EstudRole Director => new()
 49    {
 410    OwnerId = null,
 411    Name = "Diretor",
 412    NormalizedName = "DIRETOR",
 413    Description = "Gerencia campi, usuários, perfis, SSO, períodos, turmas, cursos, professores, webhooks, alunos, salas
 414    BaseType = UserType.Manager,
 415    Permissions = [
 416      EstudPermissions.ManageSso.Id,
 417      EstudPermissions.ManageCampi.Id,
 418      EstudPermissions.ManageUsers.Id,
 419      EstudPermissions.ManageRoles.Id,
 420      EstudPermissions.ManageClasses.Id,
 421            EstudPermissions.ManagePeriods.Id,
 422      EstudPermissions.ManageCourses.Id,
 423      EstudPermissions.ManageTeachers.Id,
 424            EstudPermissions.ManageWebhooks.Id,
 425            EstudPermissions.ManageStudents.Id,
 426            EstudPermissions.ManageClassrooms.Id,
 427      EstudPermissions.ManageDisciplines.Id,
 428            EstudPermissions.ManageNotifications.Id,
 429            EstudPermissions.ManageCourseOfferings.Id,
 430            EstudPermissions.ManageCourseCurriculums.Id,
 431    ],
 432  };
 33
 434  public static EstudRole Teacher => new()
 435    {
 436    OwnerId = null,
 437    Name = "Professor",
 438    NormalizedName = "PROFESSOR",
 439    Description = "Ministra aulas e avalia os alunos.",
 440    BaseType = UserType.Teacher,
 441    Permissions = [],
 442  };
 43
 444  public static EstudRole Student => new()
 445    {
 446    OwnerId = null,
 447    Name = "Aluno",
 448    NormalizedName = "ALUNO",
 449    Description = "Participa das aulas e é avaliado.",
 450    BaseType = UserType.Student,
 451    Permissions = [],
 452  };
 53}