public ActionResult Galleria(int id)
{
Album album = AlbumServices.FindEntityByIdentity(id);
if (album == null)
{
return new NotFoundMvc.NotFoundViewResult();
}
if ((album.IsPublic) || (CodeFirstSecurity.IsAuthenticated && (CodeFirstRoleServices.IsUserInRole(CodeFirstSecurity.CurrentUserName, BgResources.Security_PremiumRole))))
{
return View("Galleria", album);
}
else
{
TempData["returnUrl"] = Request.Url.ToString();
return RedirectToRoute("Default", new { controller = "Account", action = "LogOn" });
}
}