예제 #1
0
 public bool GetAllowance(int id)
 {
     try
     {
         var identity = (ClaimsIdentity)User.Identity;
         var name     = identity.Claims.Where(x => x.Type == ClaimTypes.Name).Single().Value;
         var result   = _business.IsAllowed(name, id);
         return(result);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.StackTrace);
         return(false);
     }
 }