示例#1
0
        public void CanSendToEditor()
        {
            IContentManagerService cs = CreateContentManagerService();

            Content c = cs.SendToReview(1, 2);

            Assert.IsTrue(c.AssignedTo == 2);
        }
        public ActionResult Assign(Assign assign)
        {
            MembershipUser mu = Membership.GetUser(assign.PublisherId);

            if (mu != null)
            {
                if (Roles.IsUserInRole(mu.UserName, "editor"))
                {
                    contentManagerService.SendToReview(assign.ContentId, assign.PublisherId);
                }

                if (Roles.IsUserInRole(mu.UserName, "publisher"))
                {
                    contentManagerService.SendToPublish(assign.ContentId, assign.PublisherId);
                }

                if (Roles.IsUserInRole(mu.UserName, "author"))
                {
                    contentManagerService.SendToVerify(assign.ContentId, assign.PublisherId);
                }
            }

            return(Json(new { Success = true }));
        }