🐛 Bug fixes on posts and publishers

This commit is contained in:
2025-04-19 23:51:27 +08:00
parent fb1de3da9e
commit c43ff6be7b
7 changed files with 46 additions and 11 deletions

View File

@ -26,6 +26,8 @@ public class UserInfoMiddleware(RequestDelegate next, IMemoryCache cache)
if (user is not null)
{
context.Items["CurrentUser"] = user;
var prefix = user.IsSuperuser ? "super:" : "";
context.Items["CurrentIdentity"] = $"{prefix}{userId}";
}
}