예제 #1
0
        public void AdminUpdateOrganizationTest()
        {
            InitAdmins();

            var mainOrg = base.GetOrganizationByCodeName("costEngineer");

            var orgParent = this.NewObject <PC.SCOrganization>("父组织");

            Facade.AddOrganization(orgParent, mainOrg);

            var testOrg = this.NewObject <PC.SCOrganization>("测试组织");

            Facade.AddOrganization(testOrg, orgParent);

            FacadeWithAcl.UpdateOrganization(testOrg);
        }
예제 #2
0
        public void LegalUpdateOrganizationTest()
        {
            InitAdmins();

            var mainRole = this.CreateDefaultRoleWithMembers(this.GetSCUsersByCodeNames("wanglch"));

            var mainOrg = base.GetOrganizationByCodeName("costEngineer");

            var orgParent = this.NewObject <PC.SCOrganization>("父组织");

            Facade.AddOrganization(orgParent, mainOrg);

            this.SetContainerMemberAndPermissions(orgParent, mainRole, new string[] { "UpdateChildren" });

            this.SetCurrentPrincipal(this.GetUserByCodeName("wanglch"));

            var testOrg = this.NewObject <PC.SCOrganization>("测试组织");

            Facade.AddOrganization(testOrg, orgParent);

            FacadeWithAcl.UpdateOrganization(testOrg);
        }