示例#1
0
 protected override bool AuthorizeCore(HttpContextBase httpContext)
 {
     if (Authorize.isAuthenticated())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#2
0
        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);
            }
        }