remove cerberos by thalos

This commit is contained in:
Sergio Matias Urquin
2025-05-18 19:23:42 -06:00
parent 46ebccf797
commit 82ebe4408b
88 changed files with 301 additions and 301 deletions

View File

@@ -0,0 +1,16 @@
using Core.Thalos.Application.UseCases.Roles.Input;
using FluentValidation;
namespace Core.Thalos.Application.UseCases.Roles.Validator
{
public class ChangeRoleStatusValidator : AbstractValidator<ChangeRoleStatusRequest>
{
public ChangeRoleStatusValidator()
{
RuleFor(i => i.Id).NotEmpty().NotNull().OverridePropertyName(x => x.Id).WithName("Role ID").WithMessage("Role ID is Obligatory.");
RuleFor(i => i.Status).NotNull().OverridePropertyName(x => x.Status).WithName("Status").WithMessage("Status is Obligatory.");
}
}
}

View File

@@ -0,0 +1,16 @@
using Core.Thalos.Application.UseCases.Roles.Input;
using FluentValidation;
namespace Core.Thalos.Application.UseCases.Roles.Validator
{
public class CreateRoleValidator : AbstractValidator<CreateRoleRequest>
{
public CreateRoleValidator()
{
RuleFor(i => i.Name).NotEmpty().NotNull().OverridePropertyName(x => x.Name).WithName("Role Name").WithMessage("Role Name is Obligatory.");
RuleFor(i => i.Description).NotEmpty().NotNull().OverridePropertyName(x => x.Description).WithName("Role Description").WithMessage("Role Description is Obligatory.");
RuleFor(i => i.Applications).NotNull().OverridePropertyName(x => x.Applications).WithName("AccesLevel").WithMessage("Role must have at least one application.");
RuleFor(i => i.Permissions).NotEmpty().NotNull().OverridePropertyName(x => x.Applications).WithName("Role permissions").WithMessage("Role Permissions are Obligatory.");
}
}
}

View File

@@ -0,0 +1,16 @@
using Core.Thalos.Application.UseCases.Roles.Input;
using FluentValidation;
namespace Core.Thalos.Application.UseCases.Roles.Validator
{
public class UpdateRoleValidator : AbstractValidator<UpdateRoleRequest>
{
public UpdateRoleValidator()
{
RuleFor(i => i.Name).NotEmpty().NotNull().OverridePropertyName(x => x.Name).WithName("Role Name").WithMessage("Role Name is Obligatory.");
RuleFor(i => i.Description).NotEmpty().NotNull().OverridePropertyName(x => x.Description).WithName("Role Description").WithMessage("Role Description is Obligatory.");
RuleFor(i => i.Applications).NotEmpty().NotNull().OverridePropertyName(x => x.Applications).WithName("Role applications").WithMessage("Role Applications are Obligatory.");
RuleFor(i => i.Permissions).NotEmpty().NotNull().OverridePropertyName(x => x.Applications).WithName("Role permissions").WithMessage("Role Permissions are Obligatory.");
}
}
}