Beispiel #1
0
        public void TestUserGroupServices_Group_Tree_In_Correct_Order()
        {
            var sa = GetUserSessionModel("*****@*****.**");

            var result = service.GroupsListModel(sa, null).Model as UserGroupsModel;

            string levelsequence = "";

            result.UserGroups.ForEach(m => levelsequence += m.Level);

            Assert.IsTrue(levelsequence == "011011");
        }
        public ActionResult WizardUserEdit(UserModel model, bool isEditing = false)
        {
            var tmpModel = model;
            var userId   = model.UserId.Value;

            this.ServiceResponse = userService.GetUserModel(this.CurrentUser, model, true);
            this.ProcessServiceResponse(this.ServiceResponse);

            model = this.ServiceResponse.Model as UserModel;

            // HACK:  Should probably do this a bit differently
            this.ServiceResponse = groupsService.GroupsListModel(this.CurrentUser, String.Empty);
            this.ProcessServiceResponse(this.ServiceResponse);
            model.Groups = this.ServiceResponse.Model as UserGroupsModel;

            return(PartialView("WizardUserEdit", model));
        }