Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Created June 2, 2011 20:55
Show Gist options
  • Save ferventcoder/1005305 to your computer and use it in GitHub Desktop.
Save ferventcoder/1005305 to your computer and use it in GitHub Desktop.
DropkicK Security settings
DeploymentStepsFor(File, s =>
{
s.Security(o =>
{
o.ForPath(settings.InstallPath, p =>
{
p.GrantRead(settings.UserGroupA);
p.GrantReadWrite(settings.UserGroupB);
p.Grant(Rights.ReadWrite, settings.UserGroupA);
p.Grant(Rights.ReadWrite, WindowsIdentity.GetCurrent().Name);
p.RemoveInheritance();
p.Clear()
.Preserve(settings.UserGroupA)
.Preserve(settings.UserGroupB)
.Preserve(WindowsIdentity.GetCurrent().Name)
.RemoveAdministratorsGroup()
.RemoveSystemAccount()
.RemoveUsersGroup();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment