よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public async Task <IViewComponentResult> InvokeAsync() { string roles = ((ClaimsPrincipal)User).GetSpecificClaim(CommonConstants.UserClaims.Roles); List <FunctionViewModel> functions; if (roles.Split(CommonConstants.SepRoles).Contains(CommonConstants.AppRole.AdminRole)) { functions = await _functionService.GetAll(string.Empty); } else { //TODO: Get by permission functions = await _functionService.GetsByRole(roles); } return(View(functions)); }