This commit is contained in:
2025-05-11 00:09:36 +08:00
parent ea926fe7d2
commit ef9227cc01
15 changed files with 243 additions and 19 deletions

View File

@@ -37,6 +37,20 @@
throw new ArticleNotExistsException(request.Id);
}
var identityUser = await _db.Users.FindAsync(_identity.Id);
if (identityUser == null)
{
throw new UserNotExistsException(_identity.Id);
}
if (!identityUser.IsSystemUser())
{
if (page.UserId != identityUser.Id)
{
throw new AccessDeniedException();
}
}
if (!string.IsNullOrEmpty(request.Slug) &&
request.Slug != page.Id.ToString() &&