Example #1
0
        public ActionResult GetFileG(int id)
        {
            var b = enregRepository.GetFileG(id, UserName, User.IsInRole("controller"));

            if (!b.IsAuth)
            {
                return(File(new byte[] { }, "application/text", "NotAllowed.txt"));
                //return new HttpStatusCodeResult(HttpStatusCode.Unauthorized);
            }
            return(getFile(b.FileName, "G"));
        }