mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 19:11:10 +00:00
Adds authorization permissions administrator dashboard
This commit is contained in:
1 parent
152cb48050
commit
583b8db865
106 files changed
+5916
-2085
No files matched your search
+2
-2
@@ -18,8 +18,8 @@ public class AddLibraryCommandValidator : AbstractValidator<AddLibraryCommand>
|
||||
public AddLibraryCommandValidator()
|
||||
{
|
||||
RuleFor(x => x.UserId)
|
||||
.NotEmpty().WithMessage(Errors.Library.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Library.UserIdCannotBeEmpty.Description);
|
||||
.NotEmpty().WithMessage(Errors.Users.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Users.UserIdCannotBeEmpty.Description);
|
||||
|
||||
RuleFor(x => x.LibraryType)
|
||||
.NotNull().WithMessage(Errors.Library.LibraryTypeCannotBeNull.Description)
|
||||
|
||||
+4
-4
@@ -22,12 +22,12 @@ public class UpdateLibraryCommandValidator : AbstractValidator<UpdateLibraryComm
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Library.LibraryIdCannotBeEmpty.Description);
|
||||
|
||||
RuleFor(x => x.CurrentUserId)
|
||||
.NotEmpty().WithMessage(Errors.Library.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Library.UserIdCannotBeEmpty.Description);
|
||||
.NotEmpty().WithMessage(Errors.Users.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Users.UserIdCannotBeEmpty.Description);
|
||||
|
||||
RuleFor(x => x.OwnerId)
|
||||
.NotEmpty().WithMessage(Errors.Library.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Library.UserIdCannotBeEmpty.Description);
|
||||
.NotEmpty().WithMessage(Errors.Users.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Users.UserIdCannotBeEmpty.Description);
|
||||
|
||||
RuleFor(x => x.LibraryType)
|
||||
.NotNull().WithMessage(Errors.Library.LibraryTypeCannotBeNull.Description)
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ public class GetLibraryQueryValidator : AbstractValidator<GetLibraryQuery>
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Library.LibraryIdCannotBeEmpty.Description);
|
||||
|
||||
RuleFor(x => x.UserId)
|
||||
.NotEmpty().WithMessage(Errors.Library.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Library.UserIdCannotBeEmpty.Description);
|
||||
.NotEmpty().WithMessage(Errors.Users.UserIdCannotBeEmpty.Description)
|
||||
.Must(id => id != Guid.Empty).WithMessage(Errors.Users.UserIdCannotBeEmpty.Description);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user