Files
WMSlite/WmsLite.Api/Controllers/WmsLiteControllerBase.cs
T
zhougfandCursor fa1b286463 Add WmsLite monorepo with JWT auth, tenant context, and project READMEs.
Implement API security baseline (sys_user, JWT, audit fields, transactions,
unique constraints) and Web real login with 401 handling. Document setup
and development workflows in root, WmsLite.Api, and WmsLite.Web README files.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 14:17:47 +08:00

24 lines
581 B
C#

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WmsLite.Api.Infrastructure.Auth;
namespace WmsLite.Api.Controllers;
[Authorize]
[ApiController]
public abstract class WmsLiteControllerBase : ControllerBase
{
protected ICurrentUserContext CurrentUser { get; }
protected WmsLiteControllerBase(ICurrentUserContext currentUser)
{
CurrentUser = currentUser;
}
protected string TenantId => CurrentUser.TenantId;
protected string OwnerCode => CurrentUser.OwnerCode;
protected string UserId => CurrentUser.UserId;
}