BgEngine.Controllers.PostController.GetPostByCode C# (CSharp) Method

GetPostByCode() private method

private GetPostByCode ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult
        public ActionResult GetPostByCode(string id)
        {
            if (id == null)
            {
                return new NotFoundMvc.NotFoundViewResult();
            }
            Post post = BlogServices.FindPost(id);
            if (post == null)
            {
                return new NotFoundMvc.NotFoundViewResult();
            }
            ViewBag.MetaDescription = post.Description;
            if ((post.IsPublic) || (CodeFirstRoleServices.IsUserInRole(CodeFirstSecurity.IsAuthenticated ? CodeFirstSecurity.CurrentUserName : " ", BgResources.Security_PremiumRole)))
            {
                return View("Post", post);
            }
            else
            {
                TempData["returnUrl"] = Request.Url.ToString();
                return RedirectToRoute("Default", new { controller = "Account", action = "LogOn"});
            }
        }