示例#1
0
        public virtual void SaveFolder(HttpContext context)
        {
            YZRequest       request         = new YZRequest(context);
            SecurityResType securityResType = request.GetEnum <SecurityResType>("securityResType");
            string          path            = request.GetString("path", "");
            JObject         post            = request.GetPostData <JObject>();
            ACL             acl             = post["acl"].ToObject <ACL>();

            using (BPMConnection cn = new BPMConnection())
            {
                cn.WebOpen();
                SecurityManager.SaveACL(cn, securityResType, path, null, acl);
            }
        }
示例#2
0
        public virtual void SaveACL(HttpContext context)
        {
            YZRequest       request         = new YZRequest(context);
            SecurityResType securityResType = request.GetEnum <SecurityResType>("securityResType");
            string          resName         = request.GetString("resName", "");
            string          rsid            = request.GetString("rsid", "");
            JArray          post            = request.GetPostData <JArray>();
            ACECollection   aces            = post.ToObject <ACECollection>(request.Serializer);

            using (BPMConnection cn = new BPMConnection())
            {
                cn.WebOpen();
                ACL acl = new ACL();
                acl.ACEs = aces;

                SecurityManager.SaveACL(cn, securityResType, resName, rsid, acl);
            }
        }