update สิทธิ์มองเห็นกรรมการ #1707
This commit is contained in:
parent
7af3618287
commit
49b83774ec
1 changed files with 2 additions and 1 deletions
|
|
@ -90,6 +90,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
||||||
{
|
{
|
||||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||||
}
|
}
|
||||||
|
var _permiss = jsonData["result"]?.ToString();
|
||||||
// สิทธิ์มองเห็นรายชื่อ
|
// สิทธิ์มองเห็นรายชื่อ
|
||||||
var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId);
|
var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId);
|
||||||
var profile = await _userProfileRepository.GetUserOC(userId, token.Replace("Bearer ", ""));
|
var profile = await _userProfileRepository.GetUserOC(userId, token.Replace("Bearer ", ""));
|
||||||
|
|
@ -102,7 +103,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
||||||
x.Email.Contains(keyword) ||
|
x.Email.Contains(keyword) ||
|
||||||
x.Phone.Contains(keyword) ||
|
x.Phone.Contains(keyword) ||
|
||||||
x.Qualification.Contains(keyword)) &&
|
x.Qualification.Contains(keyword)) &&
|
||||||
x.RootDnaId == profile.RootDnaId
|
(_permiss != "OWNER" && x.RootDnaId == profile.RootDnaId || _permiss == "OWNER" && true)
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
var data = data_search
|
var data = data_search
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue