Add Org and Approver Api

This commit is contained in:
Suphonchai Phoonsawat 2023-08-17 12:43:47 +07:00
parent 3c11d1b5a1
commit 5c5c85a120
3 changed files with 126 additions and 3 deletions

View file

@ -13,6 +13,7 @@ namespace BMA.EHR.Application.Repositories
private readonly IApplicationDBContext _dbContext;
private readonly DbSet<T> _dbSet;
private readonly IHttpContextAccessor _httpContextAccessor;
#endregion
@ -24,6 +25,7 @@ namespace BMA.EHR.Application.Repositories
_dbContext = dbContext;
_dbSet = _dbContext.Set<T>();
_httpContextAccessor = httpContextAccessor;
}
#endregion
@ -34,6 +36,10 @@ namespace BMA.EHR.Application.Repositories
protected string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
protected bool? IsPlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
#endregion
#region " Methods "