protected override bool AuthorizeCore(HttpContextBase httpContext) { if (Authorize.isAuthenticated()) { return(true); } else { return(false); } }
public static bool SaveJson(CanvasModel model, int pageId) { try { var node = cs.GetById(pageId); var newJson = JsonConvert.SerializeObject(model, Formatting.None); node.SetValue("canvas", newJson.ToString()); var currentUser = Authorize.GetCurrentUser(); cs.Save(node, currentUser.Id); return(true); } catch (Exception ex) { Log.Error("Canvas error on SaveJson in Repository.", ex); return(false); } }