public override void RegisterRealTasks(PhysicalServer site)
        {
            var path =  PathConverter.Convert(site,_path);

            var task = new RemoveAclsInheritanceTask(path);
            site.AddTask(task);
        }
Esempio n. 2
0
            public override void Context()
            {
                base.Context();

                if (Directory.Exists(path)) Directory.Delete(path);
                Directory.CreateDirectory(path);
                task = new RemoveAclsInheritanceTask(path);
            }
Esempio n. 3
0
            public override void Context()
            {
                base.Context();
                if (Directory.Exists(path)) Directory.Delete(path);
                Directory.CreateDirectory(path);
                var createUser = new GrantReadWriteTask(path, WellKnownSecurityRoles.CurrentUser, new DotNetPath());
                result = createUser.Execute();
                Assert.AreEqual(false, result.ContainsError());

                RemoveAclsInheritanceTask remove = new RemoveAclsInheritanceTask(path);
                result = remove.Execute();

                var groupsToPreserve = new System.Collections.Generic.List<string>
                {
                    WellKnownSecurityRoles.CurrentUser
                };
                var groupsToRemove = new System.Collections.Generic.List<string>
                {
                    WellKnownSecurityRoles.System,
                    WellKnownSecurityRoles.Administrators,
                    WellKnownSecurityRoles.Users,
                };
                task = new ClearAclsTask(path, groupsToPreserve, groupsToRemove);
            }