public bool IsCurrentUserSystemAdministrator(BcEntityContext context)
 {
     if (context == null)
     {
         context = BcEntityContext.Create();
     }
     return(context.IsUserOfRole(this.User.Identity.Name, BcRole.Administrator));
 }
 public bool IsCurrentUserOfRole(BcRole roleToCheck, BcEntityContext context)
 {
     if (context == null)
     {
         context = BcEntityContext.Create();
     }
     return(context.IsUserOfRole(this.User.Identity.Name, roleToCheck));
 }