Exemple #1
0
 public ActionResult Index()
 {
     if (!AuthorizationProvider.IsAuthenticated())
     {
         return(RedirectToAction("Login", "Account", "/"));
     }
     else
     {
         return(View());
     }
 }
        public JsonResult Announcement(string deployDate = null)
        {
            // return a empty feature for annonymous user; client side needs to have logic to handle this
            if (!AuthorizationProvider.IsAuthenticated())
            {
                return(Json(new NewFeature(), JsonRequestBehavior.AllowGet));
            }

            NewFeatureProvider provider   = new NewFeatureProvider(_dbContext);
            NewFeature         newFeature = provider.Get(deployDate);

            return(Json(newFeature, JsonRequestBehavior.AllowGet));
        }